about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorMarijn Schouten <hkBst@users.noreply.github.com>2025-01-19 14:07:32 +0100
committerGitHub <noreply@github.com>2025-01-19 14:07:32 +0100
commit01d1aeff7b7aafa0cdcfa9eb1f5158b22c6a4839 (patch)
tree217ceb2ece7af7cf2d51c7f71d737b7ab27f1aa9 /library/alloc/src
parent678e669cc4aab51e3c3fff0660d45362fb830ebd (diff)
downloadrust-01d1aeff7b7aafa0cdcfa9eb1f5158b22c6a4839.tar.gz
rust-01d1aeff7b7aafa0cdcfa9eb1f5158b22c6a4839.zip
document order of items in iterator from drain
fixes 135710
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/vec/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index cd2afd7a473..9c7ff1cf58c 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -2574,9 +2574,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.