about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorOwen Gage <owengage@gmail.com>2021-09-30 17:21:03 +0100
committerOwen Gage <owengage@gmail.com>2021-09-30 17:21:03 +0100
commite8e7f6e05cf664fe748caf0198983f72248489b4 (patch)
tree1b1e45600546c9887b730f00cc05168188d795bf /library/alloc/src
parentc6007fdc7059c677a6c089e8d2915b264c0d1326 (diff)
downloadrust-e8e7f6e05cf664fe748caf0198983f72248489b4.tar.gz
rust-e8e7f6e05cf664fe748caf0198983f72248489b4.zip
Add truncate note to Vec::resize
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/vec/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index c37ec375561..cc53df812bb 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -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
     ///