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/std/src | |
| 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/std/src')
| -rw-r--r-- | library/std/src/collections/hash/map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs index 9732d2c2d5c..5e053d36448 100644 --- a/library/std/src/collections/hash/map.rs +++ b/library/std/src/collections/hash/map.rs @@ -654,8 +654,8 @@ impl<K, V, S> HashMap<K, V, S> { /// yielded. If the closure returns `false`, or panics, the element remains /// in the map and will not be yielded. /// - /// Note that `extract_if` lets you mutate every value in the filter closure, regardless of - /// whether you choose to keep or remove it. + /// The iterator also lets you mutate the value of each element in the + /// closure, regardless of whether you choose to keep or remove it. /// /// 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. |
