diff options
| author | Alice Ryhl <[email protected]> | 2025-06-10 10:31:56 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-06-11 14:35:10 +0000 |
| commit | 47d8101924b58e03bfd065c972172e6b69331397 (patch) | |
| tree | d8ea2a1c549e0ab1760d4713a23306c85ab9b267 /rust/helpers/helpers.c | |
| parent | Linux 6.16-rc1 (diff) | |
| download | kernel-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
