diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-01-24 23:25:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-24 23:25:43 +0100 |
| commit | 575081564d89f6d1c22e4872c18d12d84b6dcab3 (patch) | |
| tree | cceb8e0629cd51410179c74221667c0dbd7d13bf | |
| parent | 1e454fe725cf81d2b6b6bc4df6d7da43307be272 (diff) | |
| parent | c282ac83366bbf94359a3f5839aefa87525ec363 (diff) | |
| download | rust-575081564d89f6d1c22e4872c18d12d84b6dcab3.tar.gz rust-575081564d89f6d1c22e4872c18d12d84b6dcab3.zip | |
Rollup merge of #135728 - hkBst:patch-8, r=joboet
document order of items in iterator from drain fixes #135710
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 88bd3f414ea..54673ceb1da 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2571,9 +2571,11 @@ impl<T, A: Allocator> Vec<T, A> { self.len += count; } - /// Removes the specified range from the vector in bulk, returning all - /// removed elements as an iterator. If the iterator is dropped before - /// being fully consumed, it drops the remaining removed elements. + /// Removes the subslice indicated by the given range from the vector, + /// returning a double-ended iterator over the removed subslice. + /// + /// If the iterator is dropped before being fully consumed, + /// it drops the remaining removed elements. /// /// The returned iterator keeps a mutable borrow on the vector to optimize /// its implementation. |
