aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-22 15:07:36 +0000
committerGitHub <[email protected]>2020-02-22 15:07:36 +0000
commit46dbe4dc80ec1cca9677a5c40348712e9e713f12 (patch)
tree14736d7097f548531ed6d26de0a1d9cd87d6fcdf
parent2cbe8a4c4be2a69b27c248ab96341c2336f983cd (diff)
parent4255bc70e8e38b9a9282b45c1a94c53e3fbf6584 (diff)
Merge #3272
3272: ra_db: removed a couple of explicit lifetimes r=matklad a=Veetaha Co-authored-by: Veetaha <[email protected]>
-rw-r--r--crates/ra_db/src/input.rs7
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