diff options
Diffstat (limited to 'crates/ra_db')
-rw-r--r-- | crates/ra_db/src/input.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 78d121683..eaff99fd3 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -165,7 +165,7 @@ impl CrateGraph { | |||
165 | self.arena.is_empty() | 165 | self.arena.is_empty() |
166 | } | 166 | } |
167 | 167 | ||
168 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = CrateId> + 'a { | 168 | pub fn iter(&self) -> impl Iterator<Item = CrateId> + '_ { |
169 | self.arena.keys().copied() | 169 | self.arena.keys().copied() |
170 | } | 170 | } |
171 | 171 | ||
@@ -183,10 +183,7 @@ impl CrateGraph { | |||
183 | Some(crate_id) | 183 | Some(crate_id) |
184 | } | 184 | } |
185 | 185 | ||
186 | pub fn dependencies<'a>( | 186 | pub fn dependencies(&self, crate_id: CrateId) -> impl Iterator<Item = &Dependency> { |
187 | &'a self, | ||
188 | crate_id: CrateId, | ||
189 | ) -> impl Iterator<Item = &'a Dependency> + 'a { | ||
190 | self.arena[&crate_id].dependencies.iter() | 187 | self.arena[&crate_id].dependencies.iter() |
191 | } | 188 | } |
192 | 189 | ||