mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Improve doc wording for retain on some collections
This commit is contained in:
parent
5f4e067719
commit
229e01d11f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
///
|
||||
|
@ -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.
|
||||
///
|
||||
|
@ -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…
Reference in New Issue
Block a user