From 3b5d8a26f594e8a62a951a1d0e97ecbb77347ae0 Mon Sep 17 00:00:00 2001 From: Collin O'Connor Date: Wed, 16 Oct 2024 19:52:50 -0500 Subject: [PATCH] Fix predicate signatures in retain_mut docs --- alloc/src/collections/linked_list.rs | 2 +- alloc/src/collections/vec_deque/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alloc/src/collections/linked_list.rs b/alloc/src/collections/linked_list.rs index 0cd410c0fb7c1..ca0ea1ec8b2ba 100644 --- a/alloc/src/collections/linked_list.rs +++ b/alloc/src/collections/linked_list.rs @@ -1082,7 +1082,7 @@ impl LinkedList { /// 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/alloc/src/collections/vec_deque/mod.rs b/alloc/src/collections/vec_deque/mod.rs index 54739c50d1d84..cf51a84bb6f24 100644 --- a/alloc/src/collections/vec_deque/mod.rs +++ b/alloc/src/collections/vec_deque/mod.rs @@ -2122,7 +2122,7 @@ impl VecDeque { /// 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. ///