Files
linux/rust/kernel
Tamir Duberstein 1b04b466c8 rust: alloc: refactor Vec::truncate using dec_len
Use `checked_sub` to satisfy the safety requirements of `dec_len` and
replace nearly the whole body of `truncate` with a call to `dec_len`.

Reviewed-by: Andrew Ballance <andrewjballance@gmail.com>
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-3-112b222604cd@gmail.com
[ Remove #[expect(unused)] from dec_len(). - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2025-04-23 12:05:22 +02:00
..
2025-03-10 15:12:17 +01:00
2025-03-16 21:59:19 +01:00
2025-02-22 15:44:19 +01:00
2025-03-16 21:59:19 +01:00
2024-12-20 17:21:04 +01:00
2024-10-08 15:44:36 +02:00
2025-03-16 21:59:19 +01:00
2024-12-20 17:19:26 +01:00
2024-11-04 16:21:44 -05:00
2025-03-16 21:59:19 +01:00