From 924ca86b3f54670e840df3404aff19c8e68136ab Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sun, 25 Dec 2022 23:16:03 +0100 Subject: [PATCH] rust: alloc: add missing comment on `try_resize` An update missing from Rust 1.57.0. The comment was added in upstream commit e8e7f6e05cf6 ("Add truncate note to Vec::resize") to `resize`, but not to our fallible version `try_resize`. Fixes: 7aaec26b2f11 ("rust: alloc: upgrade to 1.57.0") Signed-off-by: Miguel Ojeda --- rust/alloc/vec/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/rust/alloc/vec/mod.rs b/rust/alloc/vec/mod.rs index ffe89279dd1e59..37bed9d5a96691 100644 --- a/rust/alloc/vec/mod.rs +++ b/rust/alloc/vec/mod.rs @@ -2582,6 +2582,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 ///