Re: [PATCH 07/10] rust: alloc: update `VecExt` to take allocation flags

From: Benno Lossin
Date: Tue Mar 26 2024 - 09:58:51 EST


On 25.03.24 20:54, Wedson Almeida Filho wrote:
> From: Wedson Almeida Filho <walmeida@xxxxxxxxxxxxx>
>
> We also rename the methods by removing the `try_` prefix since the names
> are available due to our usage of the `no_global_oom_handling` config
> when building the `alloc` crate.
>
> Signed-off-by: Wedson Almeida Filho <walmeida@xxxxxxxxxxxxx>
> ---
> rust/kernel/alloc/vecext.rs | 106 ++++++++++++++++++++++++++++-------
> rust/kernel/lib.rs | 1 -
> rust/kernel/str.rs | 6 +-
> rust/kernel/types.rs | 4 +-
> samples/rust/rust_minimal.rs | 6 +-
> 5 files changed, 95 insertions(+), 28 deletions(-)

With Boqun's change:

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

One thing that we might consider in the future would be to create
our own `Extend` trait to allow extending a Vec with any iterator.

--
Cheers,
Benno