Reduce coupling to implementation details of the formatting machinery by avoiding direct use for `core`'s formatting traits and macros.
Acked-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Reviewed-by: Alice Ryhl aliceryhl@google.com Signed-off-by: Tamir Duberstein tamird@gmail.com --- rust/kernel/init.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs index 8d228c237954..aa3fc90d32d1 100644 --- a/rust/kernel/init.rs +++ b/rust/kernel/init.rs @@ -68,7 +68,7 @@ //! //! ```rust,ignore //! # #![allow(unreachable_pub, clippy::disallowed_names)] -//! use kernel::{prelude::*, types::Opaque}; +//! use kernel::{fmt, prelude::*, types::Opaque}; //! use core::{ptr::addr_of_mut, marker::PhantomPinned, pin::Pin}; //! # mod bindings { //! # #![allow(non_camel_case_types)] @@ -81,7 +81,7 @@ //! # trait FromErrno { //! # fn from_errno(errno: core::ffi::c_int) -> Error { //! # // Dummy error that can be constructed outside the `kernel` crate. -//! # Error::from(core::fmt::Error) +//! # Error::from(fmt::Error) //! # } //! # } //! # impl FromErrno for Error {}