From 4255bc70e8e38b9a9282b45c1a94c53e3fbf6584 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sat, 22 Feb 2020 17:00:39 +0200 Subject: [PATCH] ra_db: removed a couple of explicit lifetimes --- crates/ra_db/src/input.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 78d121683b..eaff99fd3a 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -165,7 +165,7 @@ impl CrateGraph { self.arena.is_empty() } - pub fn iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn iter(&self) -> impl Iterator + '_ { self.arena.keys().copied() } @@ -183,10 +183,7 @@ impl CrateGraph { Some(crate_id) } - pub fn dependencies<'a>( - &'a self, - crate_id: CrateId, - ) -> impl Iterator + 'a { + pub fn dependencies(&self, crate_id: CrateId) -> impl Iterator { self.arena[&crate_id].dependencies.iter() }