ra_db: removed a couple of explicit lifetimes

This commit is contained in:
Veetaha 2020-02-22 17:00:39 +02:00
parent baf832d6d9
commit 4255bc70e8

View file

@ -165,7 +165,7 @@ impl CrateGraph {
self.arena.is_empty()
}
pub fn iter<'a>(&'a self) -> impl Iterator<Item = CrateId> + 'a {
pub fn iter(&self) -> impl Iterator<Item = CrateId> + '_ {
self.arena.keys().copied()
}
@ -183,10 +183,7 @@ impl CrateGraph {
Some(crate_id)
}
pub fn dependencies<'a>(
&'a self,
crate_id: CrateId,
) -> impl Iterator<Item = &'a Dependency> + 'a {
pub fn dependencies(&self, crate_id: CrateId) -> impl Iterator<Item = &Dependency> {
self.arena[&crate_id].dependencies.iter()
}