rust: remove unneeded kernel::prelude imports from doctests
Rust doctests implicitly include `kernel::prelude::*`. Removes explicit `kernel::prelude` imports from doctests. Suggested-by: Miguel Ojeda <ojeda@kernel.org> Link: https://github.com/Rust-for-Linux/linux/issues/1064 Signed-off-by: Nell Shamrell-Harrington <nells@linux.microsoft.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20240411225331.274662-1-nells@linux.microsoft.com [ Add it back for `module_phy_driver`'s example since it is within a `mod`, and thus it cannot be removed. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
committed by
Miguel Ojeda
parent
ea175b2d6f
commit
4a2ae88051
@@ -33,7 +33,6 @@
|
||||
//! we do not need to specify ids for the fields.
|
||||
//!
|
||||
//! ```
|
||||
//! use kernel::prelude::*;
|
||||
//! use kernel::sync::Arc;
|
||||
//! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
|
||||
//!
|
||||
@@ -75,7 +74,6 @@
|
||||
//! The following example shows how multiple `work_struct` fields can be used:
|
||||
//!
|
||||
//! ```
|
||||
//! use kernel::prelude::*;
|
||||
//! use kernel::sync::Arc;
|
||||
//! use kernel::workqueue::{self, impl_has_work, new_work, Work, WorkItem};
|
||||
//!
|
||||
@@ -415,7 +413,6 @@ impl<T: ?Sized, const ID: u64> Work<T, ID> {
|
||||
/// like this:
|
||||
///
|
||||
/// ```no_run
|
||||
/// use kernel::prelude::*;
|
||||
/// use kernel::workqueue::{impl_has_work, Work};
|
||||
///
|
||||
/// struct MyWorkItem {
|
||||
|
||||
Reference in New Issue
Block a user