edit std::vec::Vec::truncate
docs
This commit is contained in:
parent
42dead4d23
commit
d1ff5e174b
@ -1110,8 +1110,8 @@ impl<T, A: Allocator> Vec<T, A> {
|
|||||||
/// Shortens the vector, keeping the first `len` elements and dropping
|
/// Shortens the vector, keeping the first `len` elements and dropping
|
||||||
/// the rest.
|
/// the rest.
|
||||||
///
|
///
|
||||||
/// If `len` is greater than the vector's current length, this has no
|
/// If `len` is greater or equal to the vector's current length, this has
|
||||||
/// effect.
|
/// no effect.
|
||||||
///
|
///
|
||||||
/// The [`drain`] method can emulate `truncate`, but causes the excess
|
/// The [`drain`] method can emulate `truncate`, but causes the excess
|
||||||
/// elements to be returned instead of dropped.
|
/// elements to be returned instead of dropped.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user