]> git.lizzy.rs Git - rust.git/blobdiff - library/alloc/src/vec/mod.rs
Add truncate note to Vec::resize
[rust.git] / library / alloc / src / vec / mod.rs
index c37ec37556157648b9986598487b396c1b709130..cc53df812bb5456bcd7fe232db8d9817ebe73d3f 100644 (file)
@@ -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
     ///