mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 17:18:25 +02:00
This is like the stdlib method drain, except that it's hard-coded to use the entire vector's range. Rust Binder uses it in the range allocator to take ownership of everything in a vector in a case where reusing the vector is desirable. Implementing `DrainAll` in terms of `slice::IterMut` lets us reuse some nice optimizations in core for the case where T is a ZST. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Benno Lossin <lossin@kernel.org> Link: https://lore.kernel.org/r/20250502-vec-methods-v5-4-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich <dakr@kernel.org> |
||
|---|---|---|
| .. | ||
| kvec | ||
| allocator.rs | ||
| allocator_test.rs | ||
| kbox.rs | ||
| kvec.rs | ||
| layout.rs | ||