Skip to content

Commit

Permalink
Add truncate note to Vec::resize
Browse files Browse the repository at this point in the history
  • Loading branch information
owengage committed Sep 30, 2021
1 parent c6007fd commit e8e7f6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit e8e7f6e

Please sign in to comment.