Skip to content
/ rust Public
forked from rust-lang/rust

Commit 3ed5d55

Browse files
committed
Fix predicate signatures in retain_mut docs
1 parent 798fb83 commit 3ed5d55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/alloc/src/collections/linked_list.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
10821082

10831083
/// Retains only the elements specified by the predicate.
10841084
///
1085-
/// In other words, remove all elements `e` for which `f(&e)` returns false.
1085+
/// In other words, remove all elements `e` for which `f(&mut e)` returns false.
10861086
/// This method operates in place, visiting each element exactly once in the
10871087
/// original order, and preserves the order of the retained elements.
10881088
///

library/alloc/src/collections/vec_deque/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
21222122

21232123
/// Retains only the elements specified by the predicate.
21242124
///
2125-
/// In other words, remove all elements `e` for which `f(&e)` returns false.
2125+
/// In other words, remove all elements `e` for which `f(&mut e)` returns false.
21262126
/// This method operates in place, visiting each element exactly once in the
21272127
/// original order, and preserves the order of the retained elements.
21282128
///

0 commit comments

Comments
 (0)