Skip to content

Commit e939846

Browse files
hkBstgitbot
authored and
gitbot
committed
document order of items in iterator from drain
fixes 135710
1 parent 0d65dd8 commit e939846

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

alloc/src/vec/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -2571,9 +2571,11 @@ impl<T, A: Allocator> Vec<T, A> {
25712571
self.len += count;
25722572
}
25732573

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

0 commit comments

Comments
 (0)