diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-03-11 03:32:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-11 03:32:06 +0100 |
| commit | f97a1c6909f2786564bcff9270fc9eef9d0a5d2f (patch) | |
| tree | 170e71eb3637996ced89f65917256fb530278cc1 /library/std/src | |
| parent | bb8274ad36db4fba178959da68a903894d0e7a86 (diff) | |
| parent | 229e01d11fc5e6e34488beb5da05702de5eac632 (diff) | |
Rollup merge of #94826 - allgoewer:fix-retain-documentation, r=yaahc
Improve doc wording for retain on some collections I found the documentation wording on the various retain methods on many collections to be unusual. I tried to invert the relation by switching `such that` with `for which` .
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | library/std/src/collections/hash/set.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index b5dd17d9929..6b63191eb58 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -621,7 +621,7 @@ impl<K, V, S> HashMap<K, V, S> { /// 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 unsorted (and unspecified) order. /// /// # Examples diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs index 876d05b50fb..fa471a3c3f3 100644 --- a/library/std/src/collections/hash/set.rs +++ b/library/std/src/collections/hash/set.rs @@ -300,7 +300,7 @@ impl<T, S> HashSet<T, S> { /// 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 unsorted (and unspecified) order. /// /// # Examples |
