Commit 04d685ec authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Matthew Maurer
Browse files

FROMGIT: rust: alloc: replace `Vec::set_len` with `inc_len`



Rename `set_len` to `inc_len` and simplify its safety contract.

Note that the usage in `CString::try_from_fmt` remains correct as the
receiver is known to have `len == 0`.

Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarTamir Duberstein <tamird@gmail.com>
Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-4-112b222604cd@gmail.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>

Bug: 414994413
(cherry picked from commit 88d5d6a3
 https://github.com/Rust-for-Linux/linux.git

 alloc-next)
Change-Id: If8c9311fed95246e2329818589e0c9104d5d0685
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 597ebe7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment