@@ -1201,30 +1201,30 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
12011201 /// [`retain`]: BTreeSet::retain
12021202 /// # Examples
12031203 ///
1204- /// Splitting a set into even and odd values, reusing the original set:
1205- ///
12061204 /// ```
12071205 /// #![feature(btree_extract_if)]
12081206 /// use std::collections::BTreeSet;
12091207 ///
1208+ /// // Splitting a set into even and odd values, reusing the original set:
12101209 /// let mut set: BTreeSet<i32> = (0..8).collect();
12111210 /// let evens: BTreeSet<_> = set.extract_if(.., |v| v % 2 == 0).collect();
12121211 /// let odds = set;
12131212 /// assert_eq!(evens.into_iter().collect::<Vec<_>>(), vec![0, 2, 4, 6]);
12141213 /// assert_eq!(odds.into_iter().collect::<Vec<_>>(), vec![1, 3, 5, 7]);
12151214 ///
1216- /// let mut map: BTreeSet<i32> = (0..8).collect();
1217- /// let low: BTreeSet<_> = map.extract_if(0..4, |_v| true).collect();
1218- /// let high = map;
1215+ /// // Splitting a set into low and high halves, reusing the original set:
1216+ /// let mut set: BTreeSet<i32> = (0..8).collect();
1217+ /// let low: BTreeSet<_> = set.extract_if(0..4, |_v| true).collect();
1218+ /// let high = set;
12191219 /// assert_eq!(low.into_iter().collect::<Vec<_>>(), [0, 1, 2, 3]);
12201220 /// assert_eq!(high.into_iter().collect::<Vec<_>>(), [4, 5, 6, 7]);
12211221 /// ```
12221222 #[ unstable( feature = "btree_extract_if" , issue = "70530" ) ]
1223- pub fn extract_if < ' a , F , R > ( & ' a mut self , range : R , pred : F ) -> ExtractIf < ' a , T , R , F , A >
1223+ pub fn extract_if < F , R > ( & mut self , range : R , pred : F ) -> ExtractIf < ' _ , T , R , F , A >
12241224 where
12251225 T : Ord ,
12261226 R : RangeBounds < T > ,
1227- F : ' a + FnMut ( & T ) -> bool ,
1227+ F : FnMut ( & T ) -> bool ,
12281228 {
12291229 let ( inner, alloc) = self . map . extract_if_inner ( range) ;
12301230 ExtractIf { pred, inner, alloc }
@@ -1585,11 +1585,11 @@ where
15851585}
15861586
15871587#[ unstable( feature = "btree_extract_if" , issue = "70530" ) ]
1588- impl < ' a , T , R , F , A : Allocator + Clone > Iterator for ExtractIf < ' _ , T , R , F , A >
1588+ impl < T , R , F , A : Allocator + Clone > Iterator for ExtractIf < ' _ , T , R , F , A >
15891589where
15901590 T : PartialOrd ,
15911591 R : RangeBounds < T > ,
1592- F : ' a + FnMut ( & T ) -> bool ,
1592+ F : FnMut ( & T ) -> bool ,
15931593{
15941594 type Item = T ;
15951595
0 commit comments