Re: [PATCH] rust: alloc: use `spare_capacity_mut` to reduce unsafe

Alice Ryhl
2025-03-17T11:50:35Z

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@gmail.com>

Looks reasonable enough.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>