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

Alice Ryhl
2024-05-20T09:40:27Z

On Sun, May 19, 2024 at 11:07 PM Miguel Ojeda <ojeda@kernel.org> 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@kernel.org>

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