]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_data_structures/src/sorted_map/index_map.rs
Apply clippy suggestions
[rust.git] / compiler / rustc_data_structures / src / sorted_map / index_map.rs
index e92db9ea128057f4c82556a55ff27d3d728aafb0..1395bb16e875c62ef81f909792ed5e3745322ee2 100644 (file)
@@ -75,7 +75,7 @@ pub fn get(&self, idx: I) -> Option<&(K, V)> {
     ///
     /// If there are multiple items that are equivalent to `key`, they will be yielded in
     /// insertion order.
-    pub fn get_by_key(&'a self, key: K) -> impl 'a + Iterator<Item = &'a V> {
+    pub fn get_by_key(&self, key: K) -> impl Iterator<Item = &V> {
         self.get_by_key_enumerated(key).map(|(_, v)| v)
     }
 
@@ -84,7 +84,7 @@ pub fn get_by_key(&'a self, key: K) -> impl 'a + Iterator<Item = &'a V> {
     ///
     /// If there are multiple items that are equivalent to `key`, they will be yielded in
     /// insertion order.
-    pub fn get_by_key_enumerated(&'a self, key: K) -> impl '_ + Iterator<Item = (I, &V)> {
+    pub fn get_by_key_enumerated(&self, key: K) -> impl Iterator<Item = (I, &V)> {
         let lower_bound = self.idx_sorted_by_item_key.partition_point(|&i| self.items[i].0 < key);
         self.idx_sorted_by_item_key[lower_bound..].iter().map_while(move |&i| {
             let (k, v) = &self.items[i];