Re: [PATCH] rust: vec: impl Default for Vec with any allocator

From: Danilo Krummrich
Date: Wed Jun 11 2025 - 13:31:17 EST


On 6/10/25 12:31 PM, Alice Ryhl wrote:
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.

Applied to alloc-next, thanks!