diff options
| author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2026-01-06 09:03:20 +0900 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-01-06 21:18:31 +0100 |
| commit | 8510ef5e3cfbd7d59a16845f85cd0194a8689761 (patch) | |
| tree | 4c86f804d4bf69738a63d137a1883fc9a7d10b11 /rust | |
| parent | 9f92d7d1cb9cccc6c703ca53d4f1d1acca79b598 (diff) | |
rust: device: Remove explicit import of CStrExt
Remove the explicit import of CStrExt. When CONFIG_PRINTK is disabled
this import causes a build error:
error: unused import: `crate::str::CStrExt`
--> rust/kernel/device.rs:17:5
|
17 | use crate::str::CStrExt as _;
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
error: aborting due to 1 previous error
CStrExt is covered by prelude::* so the explicit import is redundant.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Fixes: 3b83f5d5e78a ("rust: replace `CStr` with `core::ffi::CStr`")
Link: https://patch.msgid.link/20260106000320.2593800-1-fujita.tomonori@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/kernel/device.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs index 5c2e1e0369e9..71b200df0f40 100644 --- a/rust/kernel/device.rs +++ b/rust/kernel/device.rs @@ -14,7 +14,6 @@ use core::{any::TypeId, marker::PhantomData, ptr}; #[cfg(CONFIG_PRINTK)] use crate::c_str; -use crate::str::CStrExt as _; pub mod property; |
