Re: [PATCH] rust: avoid unused import warning in `rusttest`

From: Alice Ryhl
Date: Mon May 20 2024 - 05:40:42 EST


On Sun, May 19, 2024 at 11:07 PM Miguel Ojeda <ojeda@xxxxxxxxxx> wrote:
>
> When compiling for the `rusttest` target, the `core::ptr` import is
> unused since its only use happens in the `reserve()` method which is
> not compiled in that target:
>
> warning: unused import: `core::ptr`
> --> rust/kernel/alloc/vec_ext.rs:7:5
> |
> 7 | use core::ptr;
> | ^^^^^^^^^
> |
> = note: `#[warn(unused_imports)]` on by default
>
> Thus clean it.
>
> Fixes: 97ab3e8eec0c ("rust: alloc: fix dangling pointer in VecExt<T>::reserve()")
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>