2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/rust/kernel/alloc
Tamir Duberstein dbb0b840a0 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: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir 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: Danilo Krummrich <dakr@kernel.org>
2025-04-23 12:05:22 +02:00
..
allocator_test.rs rust: alloc: satisfy POSIX alignment requirement 2025-03-05 23:57:48 +01:00
allocator.rs rust: alloc: make ReallocFunc::call inline 2025-03-06 20:49:06 +01:00
kbox.rs rust: alloc: allow coercion from Box<T> to Box<dyn U> if T implements U 2025-04-22 17:29:37 +02:00
kvec.rs rust: alloc: add Vec::dec_len 2025-04-23 12:05:22 +02:00
layout.rs rust: alloc: add doctest for ArrayLayout::new() 2025-01-13 23:45:30 +01:00