Skip to content

Commit fcbc355

Browse files
nbdd0121ojeda
authored andcommitted
samples: rust: remove imports available via prelude
These imports are already in scope by importing `kernel::prelude::*` and does not need to be imported separately. Signed-off-by: Gary Guo <gary@garyguo.net> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260123172007.136873-4-gary@garyguo.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent e741e19 commit fcbc355

3 files changed

Lines changed: 1 addition & 4 deletions

File tree

samples/rust/rust_driver_auxiliary.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use kernel::{
1616
};
1717

1818
use core::any::TypeId;
19-
use pin_init::PinInit;
2019

2120
const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
2221
const AUXILIARY_NAME: &CStr = c_str!("auxiliary");

samples/rust/rust_misc_device.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@
9595
//! }
9696
//! ```
9797
98-
use core::pin::Pin;
99-
10098
use kernel::{
10199
c_str,
102100
device::Device,

samples/rust/rust_print_main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Drop for RustPrint {
101101
}
102102

103103
mod trace {
104-
use kernel::ffi::c_int;
104+
use kernel::prelude::*;
105105

106106
kernel::declare_trace! {
107107
/// # Safety

0 commit comments

Comments
 (0)