@@ -1151,21 +1151,23 @@ impl<K, V> BTreeMap<K, V> {
11511151 right
11521152 }
11531153
1154- /// Creates an iterator which uses a closure to determine if an element should be removed.
1155- ///
1156- /// If the closure returns true, the element is removed from the map and yielded.
1157- /// If the closure returns false, or panics, the element remains in the map and will not be
1158- /// yielded.
1159- ///
1160- /// Note that `drain_filter` lets you mutate every value in the filter closure, regardless of
1161- /// whether you choose to keep or remove it.
1162- ///
1163- /// If the iterator is only partially consumed or not consumed at all, each of the remaining
1164- /// elements will still be subjected to the closure and removed and dropped if it returns true.
1165- ///
1166- /// It is unspecified how many more elements will be subjected to the closure
1167- /// if a panic occurs in the closure, or a panic occurs while dropping an element,
1168- /// or if the `DrainFilter` value is leaked.
1154+ /// Creates an iterator that visits all elements (key-value pairs) in
1155+ /// ascending key order and uses a closure to determine if an element should
1156+ /// be removed. If the closure returns `true`, the element is removed from
1157+ /// the map and yielded. If the closure returns `false`, or panics, the
1158+ /// element remains in the map and will not be yielded.
1159+ ///
1160+ /// The iterator also lets you mutate the value of each element in the
1161+ /// closure, regardless of whether you choose to keep or remove it.
1162+ ///
1163+ /// If the iterator is only partially consumed or not consumed at all, each
1164+ /// of the remaining elements is still subjected to the closure, which may
1165+ /// change its value and, by returning `true`, have the element removed and
1166+ /// dropped.
1167+ ///
1168+ /// It is unspecified how many more elements will be subjected to the
1169+ /// closure if a panic occurs in the closure, or a panic occurs while
1170+ /// dropping an element, or if the `DrainFilter` value is leaked.
11691171 ///
11701172 /// # Examples
11711173 ///
0 commit comments