lkml.org 
[lkml]   [2024]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 02/10] rust: alloc: introduce the `VecExt` trait
On 27.03.24 03:35, Wedson Almeida Filho wrote:
> From: Wedson Almeida Filho <walmeida@microsoft.com>
>
> 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.
>
> Suggested-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
> ---
> rust/kernel/alloc.rs | 1 +
> rust/kernel/alloc/vec_ext.rs | 48 ++++++++++++++++++++++++++++++++++++
> rust/kernel/lib.rs | 1 +
> rust/kernel/prelude.rs | 2 ++
> 4 files changed, 52 insertions(+)
> create mode 100644 rust/kernel/alloc/vec_ext.rs

Reviewed-by: Benno Lossin <benno.lossin@proton.me>

--
Cheers,
Benno


\
 
 \ /
  Last update: 2024-05-27 16:12    [W:0.105 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site