Skip to content
Commit a126eca8 authored by Miguel Ojeda's avatar Miguel Ojeda
Browse files

rust: avoid unused import warning in `rusttest`

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: 97ab3e8e

 ("rust: alloc: fix dangling pointer in VecExt<T>::reserve()")
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarDanilo Krummrich <dakr@redhat.com>
Link: https://lore.kernel.org/r/20240519210735.587323-1-ojeda@kernel.org
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 83a7eefe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment