diff options
author | Tamir Duberstein <tamird@gmail.com> | 2025-03-18 17:52:42 +0300 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2025-04-07 17:59:06 +0300 |
commit | c3152988c047a7b6abb10d4dc5e24fafbabe8b7e (patch) | |
tree | 64edad0597d158a4a522ac8d7600c59af2be79e5 /scripts/lib/kdoc/kdoc_output.py | |
parent | 1679b7159379d11100e4ab7d1de23c8cd7765aa1 (diff) | |
download | linux-c3152988c047a7b6abb10d4dc5e24fafbabe8b7e.tar.xz |
rust: alloc: use `spare_capacity_mut` to reduce unsafe
Use `spare_capacity_mut` in the implementation of `push` to reduce the
use of `unsafe`. Both methods were added in commit 2aac4cd7dae3 ("rust:
alloc: implement kernel `Vec` type").
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20250318-vec-push-use-spare-v3-1-68741671d1af@gmail.com
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions