X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Falloc%2Fsrc%2Fvec%2Fmod.rs;h=cc53df812bb5456bcd7fe232db8d9817ebe73d3f;hb=e8e7f6e05cf664fe748caf0198983f72248489b4;hp=c37ec37556157648b9986598487b396c1b709130;hpb=3c60e040b29c6b9cbf0ed1df31d7469d4634ac4d;p=rust.git 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 Vec { /// 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 ///