Skip to content

Commit

Permalink
rust: alloc: add missing comment on try_resize
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ojeda committed Dec 25, 2022
1 parent 8e8dc43 commit 924ca86
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust/alloc/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2582,6 +2582,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
///
Expand Down

0 comments on commit 924ca86

Please sign in to comment.