Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: file: use `kernel::{fmt,prelude::fmt!}`

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>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Tamir Duberstein and committed by
Miguel Ojeda
e6aedde2 97bcbe58

+3 -2
+3 -2
rust/kernel/fs/file.rs
··· 11 11 bindings, 12 12 cred::Credential, 13 13 error::{code::*, Error, Result}, 14 + fmt, 14 15 types::{ARef, AlwaysRefCounted, NotThreadSafe, Opaque}, 15 16 }; 16 17 use core::ptr; ··· 461 460 } 462 461 } 463 462 464 - impl core::fmt::Debug for BadFdError { 465 - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 463 + impl fmt::Debug for BadFdError { 464 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 466 465 f.pad("EBADF") 467 466 } 468 467 }