diff options
| author | Paul Mabileau <paul.mabileau@harfanglab.fr> | 2025-05-17 02:45:56 +0200 |
|---|---|---|
| committer | Paul Mabileau <paul.mabileau@harfanglab.fr> | 2025-05-17 02:45:56 +0200 |
| commit | 014434e96f4f42e06b6c2dfc00110209b121040e (patch) | |
| tree | 624de4a4aec5f586d13ac7852c77614529c9ed7a /library/alloc/src/vec | |
| parent | 9205ee27a815e5b356cfce6269d9ded1d1c098f7 (diff) | |
| download | rust-014434e96f4f42e06b6c2dfc00110209b121040e.tar.gz rust-014434e96f4f42e06b6c2dfc00110209b121040e.zip | |
Docs(lib/extract_if): Unify paragraph about elements mutation
Take the one from `BTreeMap` that seems the best-worded and most precise among the available variations. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index e5f2c9468e3..3ea5f160666 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -3692,8 +3692,8 @@ impl<T, A: Allocator> Vec<T, A> { /// But `extract_if` is easier to use. `extract_if` is also more efficient, /// because it can backshift the elements of the array in bulk. /// - /// Note that `extract_if` also lets you mutate the elements passed to the filter closure, - /// regardless of whether you choose to keep or remove them. + /// The iterator also lets you mutate the value of each element in the + /// closure, regardless of whether you choose to keep or remove it. /// /// # Panics /// |
