1
Fork 0

Rollup merge of #135728 - hkBst:patch-8, r=joboet

document order of items in iterator from drain

fixes #135710
This commit is contained in:
Matthias Krüger 2025-01-24 23:25:43 +01:00 committed by GitHub
commit 575081564d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2571,9 +2571,11 @@ impl<T, A: Allocator> Vec<T, A> {
self.len += count; self.len += count;
} }
/// Removes the specified range from the vector in bulk, returning all /// Removes the subslice indicated by the given range from the vector,
/// removed elements as an iterator. If the iterator is dropped before /// returning a double-ended iterator over the removed subslice.
/// being fully consumed, it drops the remaining removed elements. ///
/// 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 /// The returned iterator keeps a mutable borrow on the vector to optimize
/// its implementation. /// its implementation.