diff options
| author | Maik Allgöwer <maik@llgoewer.de> | 2022-03-11 00:16:45 +0100 |
|---|---|---|
| committer | Maik Allgöwer <maik@llgoewer.de> | 2022-03-11 00:29:43 +0100 |
| commit | 229e01d11fc5e6e34488beb5da05702de5eac632 (patch) | |
| tree | 8711b69625b4918b3976e9dd888c3116cd49e534 /library/alloc/src | |
| parent | 5f4e0677190b82e61dc507e3e72caf89da8e5e28 (diff) | |
| download | rust-229e01d11fc5e6e34488beb5da05702de5eac632.tar.gz rust-229e01d11fc5e6e34488beb5da05702de5eac632.zip | |
Improve doc wording for retain on some collections
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/binary_heap.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/map.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/btree/set.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs index e18cd8cd464..eff21e5c11e 100644 --- a/library/alloc/src/collections/binary_heap.rs +++ b/library/alloc/src/collections/binary_heap.rs @@ -779,7 +779,7 @@ impl<T: Ord> BinaryHeap<T> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` such that `f(&e)` returns + /// In other words, remove all elements `e` for which `f(&e)` returns /// `false`. The elements are visited in unsorted (and unspecified) order. /// /// # Examples diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs index 7890c1040f0..12c99525580 100644 --- a/library/alloc/src/collections/btree/map.rs +++ b/library/alloc/src/collections/btree/map.rs @@ -963,7 +963,7 @@ impl<K, V> BTreeMap<K, V> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all pairs `(k, v)` such that `f(&k, &mut v)` returns `false`. + /// In other words, remove all pairs `(k, v)` for which `f(&k, &mut v)` returns `false`. /// The elements are visited in ascending key order. /// /// # Examples diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs index bab6af82698..c6a15953e87 100644 --- a/library/alloc/src/collections/btree/set.rs +++ b/library/alloc/src/collections/btree/set.rs @@ -873,7 +873,7 @@ impl<T> BTreeSet<T> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` such that `f(&e)` returns `false`. + /// In other words, remove all elements `e` for which `f(&e)` returns `false`. /// The elements are visited in ascending order. /// /// # Examples diff --git a/library/alloc/src/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 7139a0fb94d..c3cabc754e6 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -2119,7 +2119,7 @@ impl<T, A: Allocator> VecDeque<T, A> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` such that `f(&e)` returns false. + /// In other words, remove all elements `e` for which `f(&e)` returns false. /// This method operates in place, visiting each element exactly once in the /// original order, and preserves the order of the retained elements. /// @@ -2158,7 +2158,7 @@ impl<T, A: Allocator> VecDeque<T, A> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` such that `f(&e)` returns false. + /// In other words, remove all elements `e` for which `f(&e)` returns false. /// This method operates in place, visiting each element exactly once in the /// original order, and preserves the order of the retained elements. /// diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index c4c393f55ee..b898bd8743f 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1424,7 +1424,7 @@ impl<T, A: Allocator> Vec<T, A> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` such that `f(&e)` returns `false`. + /// In other words, remove all elements `e` for which `f(&e)` returns `false`. /// This method operates in place, visiting each element exactly once in the /// original order, and preserves the order of the retained elements. /// |
