Re: [PATCH] rust: alloc: use `spare_capacity_mut` to reduce unsafe
From: Alice Ryhl
Date: Mon Mar 17 2025 - 07:50:46 EST
On Mon, Mar 17, 2025 at 07:42:28AM -0400, Tamir Duberstein wrote:
> Use `spare_capacity_mut` in the implementation of `push` to reduce the
> use of `unsafe`. Both methods were added in commit 2aac4cd7dae3 ("rust:
> alloc: implement kernel `Vec` type").
>
> Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxx>
Looks reasonable enough.
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>