Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 03989773 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Miguel Ojeda
Browse files

rust: alloc: introduce the `VecExt` trait


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: default avatarBenno Lossin <benno.lossin@proton.me>
Suggested-by: default avatarGary Guo <gary@garyguo.net>
Signed-off-by: default avatarWedson Almeida Filho <walmeida@microsoft.com>
Link: https://lore.kernel.org/r/20240328013603.206764-3-wedsonaf@gmail.com


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 31d94d8f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment