Skip to content

Commit 8510ef5

Browse files
fujitaDanilo Krummrich
authored andcommitted
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: 3b83f5d ("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>
1 parent 9f92d7d commit 8510ef5

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

rust/kernel/device.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use core::{any::TypeId, marker::PhantomData, ptr};
1414

1515
#[cfg(CONFIG_PRINTK)]
1616
use crate::c_str;
17-
use crate::str::CStrExt as _;
1817

1918
pub mod property;
2019

0 commit comments

Comments
 (0)