mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-23 19:05:22 +00:00
Make `try_with_capacity`, `try_push`, and `try_extend_from_slice` methods available in `Vec` even though it doesn't implement them. It is implemented with `try_reserve` and `push_within_capacity`. This is in preparation for switching to the upstream `alloc` crate. Reviewed-by: Benno Lossin <benno.lossin@proton.me> Suggested-by: Gary Guo <gary@garyguo.net> Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com> Link: https://lore.kernel.org/r/20240328013603.206764-3-wedsonaf@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
9 lines
148 B
Rust
9 lines
148 B
Rust
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
//! Extensions to the [`alloc`] crate.
|
|
|
|
#[cfg(not(test))]
|
|
#[cfg(not(testlib))]
|
|
mod allocator;
|
|
pub mod vec_ext;
|