Commit 8a1546ee authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Matthew Maurer
Browse files

FROMGIT: rust: alloc: add `Vec::dec_len`



Add `Vec::dec_len` that reduces the length of the receiver. This method
is intended to be used from methods that remove elements from `Vec` such
as `truncate`, `pop`, `remove`, and others. This method is intentionally
not `pub`.

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-2-112b222604cd@gmail.com


[ Add #[expect(unused)] to dec_len(). - Danilo ]
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>

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

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