aboutsummaryrefslogtreecommitdiff
path: root/rust/alloc/vec/mod.rs
diff options
context:
space:
mode:
authorWedson Almeida Filho <[email protected]>2024-03-27 22:35:55 -0300
committerMiguel Ojeda <[email protected]>2024-04-16 22:03:14 +0200
commit03989773a94490383b062912feb0c4d175f20845 (patch)
tree14df87b69f4c7820ebe8802761496594feae13f0 /rust/alloc/vec/mod.rs
parent31d94d8f586df55e7dce47a67a8428f46d09f906 (diff)
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: Benno Lossin <[email protected]> Suggested-by: Gary Guo <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/alloc/vec/mod.rs')
0 files changed, 0 insertions, 0 deletions