diff --git a/src/range_map.rs b/src/range_map.rs index 8b5a3af5bac5..f0507ffabad0 100644 --- a/src/range_map.rs +++ b/src/range_map.rs @@ -63,7 +63,7 @@ impl RangeMap { /// through interior mutability. /// /// The iterator also provides the offset of the given element. - pub fn iter<'a>(&'a self, offset: Size, len: Size) -> impl Iterator + 'a { + pub fn iter(&self, offset: Size, len: Size) -> impl Iterator { let offset = offset.bytes(); let len = len.bytes(); // Compute a slice starting with the elements we care about. @@ -83,7 +83,7 @@ impl RangeMap { .map(|elem| (Size::from_bytes(elem.range.start), &elem.data)) } - pub fn iter_mut_all<'a>(&'a mut self) -> impl Iterator + 'a { + pub fn iter_mut_all(&mut self) -> impl Iterator { self.v.iter_mut().map(|elem| &mut elem.data) } @@ -119,11 +119,7 @@ impl RangeMap { /// Moreover, this will opportunistically merge neighbouring equal blocks. /// /// The iterator also provides the offset of the given element. - pub fn iter_mut<'a>( - &'a mut self, - offset: Size, - len: Size, - ) -> impl Iterator + 'a + pub fn iter_mut(&mut self, offset: Size, len: Size) -> impl Iterator where T: Clone + PartialEq, {