From dac9d78647f2a1483710e2417d817c7df04eba8d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 13 Jun 2025 20:04:49 -0700 Subject: [PATCH] Remove unneeded lifetimes from signature of BTreeSet::extract_if --- library/alloc/src/collections/btree/set.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 51418036f428e..aa9e5fce1d4cc 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -1220,11 +1220,11 @@ impl BTreeSet { /// assert_eq!(high.into_iter().collect::>(), [4, 5, 6, 7]); /// ``` #[unstable(feature = "btree_extract_if", issue = "70530")] - pub fn extract_if<'a, F, R>(&'a mut self, range: R, pred: F) -> ExtractIf<'a, T, R, F, A> + pub fn extract_if(&mut self, range: R, pred: F) -> ExtractIf<'_, T, R, F, A> where T: Ord, R: RangeBounds, - F: 'a + FnMut(&T) -> bool, + F: FnMut(&T) -> bool, { let (inner, alloc) = self.map.extract_if_inner(range); ExtractIf { pred, inner, alloc } @@ -1585,11 +1585,11 @@ where } #[unstable(feature = "btree_extract_if", issue = "70530")] -impl<'a, T, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, T, R, F, A> +impl Iterator for ExtractIf<'_, T, R, F, A> where T: PartialOrd, R: RangeBounds, - F: 'a + FnMut(&T) -> bool, + F: FnMut(&T) -> bool, { type Item = T;