diff --git a/collections/btree/map.rs b/collections/btree/map.rs index dfd693d..79042ab 100644 --- a/collections/btree/map.rs +++ b/collections/btree/map.rs @@ -935,6 +935,7 @@ impl BTreeMap { /// Retains only the elements specified by the predicate. /// /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`. + /// The elements are visited in ascending key order. /// /// # Examples /// diff --git a/collections/btree/set.rs b/collections/btree/set.rs index be740b0..9711214 100644 --- a/collections/btree/set.rs +++ b/collections/btree/set.rs @@ -846,6 +846,7 @@ impl BTreeSet { /// Retains only the elements specified by the predicate. /// /// In other words, remove all elements `e` such that `f(&e)` returns `false`. + /// The elements are visited in ascending order. /// /// # Examples ///