linux/rust/kernel/alloc
Tamir Duberstein 88d5d6a38d 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: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Link: https://lore.kernel.org/r/20250416-vec-set-len-v4-4-112b222604cd@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2025-04-23 12:05:23 +02:00
..
allocator.rs rust: alloc: make ReallocFunc::call inline 2025-03-06 20:49:06 +01:00
allocator_test.rs rust: alloc: satisfy POSIX alignment requirement 2025-03-05 23:57:48 +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: replace Vec::set_len with inc_len 2025-04-23 12:05:23 +02:00
layout.rs rust: alloc: add doctest for ArrayLayout::new() 2025-01-13 23:45:30 +01:00