aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorAlice Ryhl <[email protected]>2025-06-10 10:31:56 +0000
committerDanilo Krummrich <[email protected]>2025-06-11 14:35:10 +0000
commit47d8101924b58e03bfd065c972172e6b69331397 (patch)
treed8ea2a1c549e0ab1760d4713a23306c85ab9b267 /rust/helpers/helpers.c
parentLinux 6.16-rc1 (diff)
downloadkernel-47d8101924b58e03bfd065c972172e6b69331397.tar.gz
kernel-47d8101924b58e03bfd065c972172e6b69331397.zip
rust: vec: impl Default for Vec with any allocator
The implementation of Default is restricted to only work with kmalloc vectors for no good reason. This means I have to use mem::replace(&mut my_vec, KVVec::new()) in Rust Binder instead of `mem::take(&mut my_vec)`. Thus, expand the impl of Default to work with any allocator including kvmalloc. Signed-off-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions