@@ -940,18 +940,20 @@ impl<T> BTreeSet<T> {
940
940
BTreeSet { map : self . map . split_off ( key) }
941
941
}
942
942
943
- /// Creates an iterator which uses a closure to determine if a value should be removed.
943
+ /// Creates an iterator that visits all values in ascending order and uses a closure
944
+ /// to determine if a value should be removed.
944
945
///
945
- /// If the closure returns true, then the value is removed and yielded.
946
- /// If the closure returns false, the value will remain in the list and will not be yielded
947
- /// by the iterator .
946
+ /// If the closure returns ` true`, the value is removed from the set and yielded. If
947
+ /// the closure returns ` false`, or panics, the value remains in the set and will
948
+ /// not be yielded .
948
949
///
949
- /// If the iterator is only partially consumed or not consumed at all, each of the remaining
950
- /// values will still be subjected to the closure and removed and dropped if it returns true.
950
+ /// If the iterator is only partially consumed or not consumed at all, each of the
951
+ /// remaining values is still subjected to the closure and removed and dropped if it
952
+ /// returns `true`.
951
953
///
952
- /// It is unspecified how many more values will be subjected to the closure
953
- /// if a panic occurs in the closure, or if a panic occurs while dropping a value, or if the
954
- /// `DrainFilter` itself is leaked.
954
+ /// It is unspecified how many more values will be subjected to the closure if a
955
+ /// panic occurs in the closure, or if a panic occurs while dropping a value, or if
956
+ /// the `DrainFilter` itself is leaked.
955
957
///
956
958
/// # Examples
957
959
///
0 commit comments