about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorPaolo Barbolini <paolo.barbolini@m4ss.net>2025-05-03 16:29:22 +0000
committerPaolo Barbolini <paolo.barbolini@m4ss.net>2025-05-03 16:39:47 +0000
commit5cbb27ff90b6685a27492dc2b1a23074e6194f9a (patch)
tree8b854b8b8857ef26b13ccbf18a080029d7f520c7 /library/alloc/src
parentd7df5bdf2986e596aeaeec38e732711c69ebbce1 (diff)
Suggest `retain_mut` over `retain` as `Vec::extract_if` alternative
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/vec/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 65a83cb98ba..72279e12192 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -3659,9 +3659,9 @@ impl<T, A: Allocator> Vec<T, A> {
     ///
     /// If the returned `ExtractIf` is not exhausted, e.g. because it is dropped without iterating
     /// or the iteration short-circuits, then the remaining elements will be retained.
-    /// Use [`retain`] with a negated predicate if you do not need the returned iterator.
+    /// Use [`retain_mut`] with a negated predicate if you do not need the returned iterator.
     ///
-    /// [`retain`]: Vec::retain
+    /// [`retain_mut`]: Vec::retain_mut
     ///
     /// Using this method is equivalent to the following code:
     ///