Skip to content

Commit

Permalink
Apply suggestion from review
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Jul 24, 2020
1 parent 771ec21 commit 654c180
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/liballoc/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,12 +1274,10 @@ impl<T> Vec<T> {
/// Creates a draining iterator that removes the specified range in the vector
/// and yields the removed items.
///
/// The element range is removed even if the iterator is only partially
/// consumed or not consumed at all.
///
/// Note: Be aware that if the iterator is leaked (eg: [`mem::forget`]), it
/// cancels this property so it is unspecified how many elements are removed
/// from the vector in this case.
/// When the iterator **is** dropped, all elements in the range are removed
/// from the vector, even if the iterator was not fully consumed. If the
/// iterator **is not** dropped (with [`mem::forget`] for example), it is
/// unspecified how many elements are removed.
///
/// # Panics
///
Expand Down

0 comments on commit 654c180

Please sign in to comment.