1
Fork 0

document order of items in iterator from drain

fixes 135710
This commit is contained in:
Marijn Schouten 2025-01-19 14:07:32 +01:00 committed by GitHub
parent 678e669cc4
commit 01d1aeff7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.