Skip to content

Commit 924ca86

Browse files
committed
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: 7aaec26 ("rust: alloc: upgrade to 1.57.0") Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 8e8dc43 commit 924ca86

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rust/alloc/vec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,7 @@ impl<T: Clone, A: Allocator> Vec<T, A> {
25822582
/// in order to be able to clone the passed value.
25832583
/// If you need more flexibility (or want to rely on [`Default`] instead of
25842584
/// [`Clone`]), use [`Vec::resize_with`].
2585+
/// If you only need to resize to a smaller size, use [`Vec::truncate`].
25852586
///
25862587
/// # Examples
25872588
///

0 commit comments

Comments
 (0)