mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
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
|
||||
/// the rest.
|
||||
///
|
||||
/// If `len` is greater than the vector's current length, this has no
|
||||
/// effect.
|
||||
/// If `len` is greater or equal to the vector's current length, this has
|
||||
/// no effect.
|
||||
///
|
||||
/// The [`drain`] method can emulate `truncate`, but causes the excess
|
||||
/// elements to be returned instead of dropped.
|
||||
|
Loading…
Reference in New Issue
Block a user