diff options
| author | Collin O'Connor <collinoc+dev@protonmail.com> | 2024-10-16 19:52:50 -0500 |
|---|---|---|
| committer | Collin O'Connor <collinoc+dev@protonmail.com> | 2024-10-16 19:52:50 -0500 |
| commit | 3ed5d5590e12d972acf4ca6a503d0b00f233ad0e (patch) | |
| tree | 5ccbb2069652bae332620c5be9b95e24629326d7 /library/alloc | |
| parent | 798fb83f7d24e31b16acca113496f39ff168c143 (diff) | |
Fix predicate signatures in retain_mut docs
Diffstat (limited to 'library/alloc')
| -rw-r--r-- | library/alloc/src/collections/linked_list.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/collections/vec_deque/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs index 0cd410c0fb7..ca0ea1ec8b2 100644 --- a/library/alloc/src/collections/linked_list.rs +++ b/library/alloc/src/collections/linked_list.rs @@ -1082,7 +1082,7 @@ impl<T, A: Allocator> LinkedList<T, A> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` for which `f(&e)` returns false. + /// In other words, remove all elements `e` for which `f(&mut 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/collections/vec_deque/mod.rs b/library/alloc/src/collections/vec_deque/mod.rs index 54739c50d1d..cf51a84bb6f 100644 --- a/library/alloc/src/collections/vec_deque/mod.rs +++ b/library/alloc/src/collections/vec_deque/mod.rs @@ -2122,7 +2122,7 @@ impl<T, A: Allocator> VecDeque<T, A> { /// Retains only the elements specified by the predicate. /// - /// In other words, remove all elements `e` for which `f(&e)` returns false. + /// In other words, remove all elements `e` for which `f(&mut 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. /// |
