diff options
| author | Paul Mabileau <paul.mabileau@harfanglab.fr> | 2025-05-17 02:36:08 +0200 |
|---|---|---|
| committer | Paul Mabileau <paul.mabileau@harfanglab.fr> | 2025-05-17 02:36:08 +0200 |
| commit | 9205ee27a815e5b356cfce6269d9ded1d1c098f7 (patch) | |
| tree | 1a25d21812ecd6a072dd4bce80c18077407e6528 /library/alloc/src/vec/mod.rs | |
| parent | 35f847363729b16332eab1a85900617218495757 (diff) | |
| download | rust-9205ee27a815e5b356cfce6269d9ded1d1c098f7.tar.gz rust-9205ee27a815e5b356cfce6269d9ded1d1c098f7.zip | |
Docs(lib/extract_if): Unify paragraph about closure actions
Also fixes `HashSet`'s that incorrectly designated itself as a `list`. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
Diffstat (limited to 'library/alloc/src/vec/mod.rs')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 4d03ca63ec8..e5f2c9468e3 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -3650,9 +3650,9 @@ impl<T, A: Allocator> Vec<T, A> { /// Creates an iterator which uses a closure to determine if an element in the range should be removed. /// - /// If the closure returns true, then the element is removed and yielded. - /// If the closure returns false, the element will remain in the vector and will not be yielded - /// by the iterator. + /// If the closure returns `true`, the element is removed from the vector + /// and yielded. If the closure returns `false`, or panics, the element + /// remains in the vector and will not be yielded. /// /// Only elements that fall in the provided range are considered for extraction, but any elements /// after the range will still have to be moved if any element has been extracted. |
