mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
Merge #3272
3272: ra_db: removed a couple of explicit lifetimes r=matklad a=Veetaha Co-authored-by: Veetaha <gerzoh1@gmail.com>
This commit is contained in:
commit
46dbe4dc80
1 changed files with 2 additions and 5 deletions
|
@ -165,7 +165,7 @@ impl CrateGraph {
|
||||||
self.arena.is_empty()
|
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()
|
self.arena.keys().copied()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,10 +183,7 @@ impl CrateGraph {
|
||||||
Some(crate_id)
|
Some(crate_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn dependencies<'a>(
|
pub fn dependencies(&self, crate_id: CrateId) -> impl Iterator<Item = &Dependency> {
|
||||||
&'a self,
|
|
||||||
crate_id: CrateId,
|
|
||||||
) -> impl Iterator<Item = &'a Dependency> + 'a {
|
|
||||||
self.arena[&crate_id].dependencies.iter()
|
self.arena[&crate_id].dependencies.iter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue