diff options
| author | David Tolnay <dtolnay@gmail.com> | 2025-06-13 20:04:49 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2025-06-13 20:33:54 -0700 |
| commit | dac9d78647f2a1483710e2417d817c7df04eba8d (patch) | |
| tree | 6e75145a02829798201d5112f79675e3266344f5 | |
| parent | 8da623945f83933dd38644d5745532ee032e855b (diff) | |
| download | rust-dac9d78647f2a1483710e2417d817c7df04eba8d.tar.gz rust-dac9d78647f2a1483710e2417d817c7df04eba8d.zip | |
Remove unneeded lifetimes from signature of BTreeSet::extract_if
| -rw-r--r-- | library/alloc/src/collections/btree/set.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index 51418036f42..aa9e5fce1d4 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -1220,11 +1220,11 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> { /// assert_eq!(high.into_iter().collect::<Vec<_>>(), [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<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, T, R, F, A> where T: Ord, R: RangeBounds<T>, - 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<T, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, T, R, F, A> where T: PartialOrd, R: RangeBounds<T>, - F: 'a + FnMut(&T) -> bool, + F: FnMut(&T) -> bool, { type Item = T; |
