From 01d1aeff7b7aafa0cdcfa9eb1f5158b22c6a4839 Mon Sep 17 00:00:00 2001 From: Marijn Schouten Date: Sun, 19 Jan 2025 14:07:32 +0100 Subject: [PATCH 1/2] document order of items in iterator from drain fixes 135710 --- library/alloc/src/vec/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index cd2afd7a47319..9c7ff1cf58c41 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2574,9 +2574,11 @@ impl Vec { 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. From c282ac83366bbf94359a3f5839aefa87525ec363 Mon Sep 17 00:00:00 2001 From: Marijn Schouten Date: Sun, 19 Jan 2025 16:45:07 +0100 Subject: [PATCH 2/2] Fix whitespace --- library/alloc/src/vec/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 9c7ff1cf58c41..d47d924b5b18e 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2576,7 +2576,7 @@ impl Vec { /// 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. ///