Add truncate note to Vec::resize
This commit is contained in:
parent
c6007fdc70
commit
e8e7f6e05c
1 changed files with 1 additions and 0 deletions
|
@ -2116,6 +2116,7 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
|
|||
/// in order to be able to clone the passed value.
|
||||
/// If you need more flexibility (or want to rely on [`Default`] instead of
|
||||
/// [`Clone`]), use [`Vec::resize_with`].
|
||||
/// If you only need to resize to a smaller size, use [`Vec::truncate`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
|
Loading…
Add table
Reference in a new issue