Skip to content

Commit 01d1aef

Browse files
authored
document order of items in iterator from drain
fixes 135710
1 parent 678e669 commit 01d1aef

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: library/alloc/src/vec/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -2574,9 +2574,11 @@ impl<T, A: Allocator> Vec<T, A> {
25742574
self.len += count;
25752575
}
25762576

2577-
/// Removes the specified range from the vector in bulk, returning all
2578-
/// removed elements as an iterator. If the iterator is dropped before
2579-
/// being fully consumed, it drops the remaining removed elements.
2577+
/// Removes the subslice indicated by the given range from the vector,
2578+
/// returning a double-ended iterator over the removed subslice.
2579+
///
2580+
/// If the iterator is dropped before being fully consumed,
2581+
/// it drops the remaining removed elements.
25802582
///
25812583
/// The returned iterator keeps a mutable borrow on the vector to optimize
25822584
/// its implementation.

0 commit comments

Comments
 (0)