edit std::vec::Vec::truncate docs

This commit is contained in:
mxnkarou 2023-09-16 15:46:31 +02:00
parent 42dead4d23
commit d1ff5e174b
No known key found for this signature in database
GPG Key ID: 93426F8C862526F2

View File

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