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` .
This commit is contained in:
commit
f97a1c6909
7 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue