mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
rust: fmt: use vertical import style
Switch single-line `use` imports in fmt.rs to vertical style for better readability and easier maintenance. Signed-off-by: Ke Sun <sunke@kylinos.cn> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260512-clean-fmt-use-v1-1-7ae7858192ac@kylinos.cn Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
6c77b5f4d7
commit
fc1ce3afa2
|
|
@ -4,7 +4,14 @@
|
|||
//!
|
||||
//! This module is intended to be used in place of `core::fmt` in kernel code.
|
||||
|
||||
pub use core::fmt::{Arguments, Debug, Error, Formatter, Result, Write};
|
||||
pub use core::fmt::{
|
||||
Arguments,
|
||||
Debug,
|
||||
Error,
|
||||
Formatter,
|
||||
Result,
|
||||
Write, //
|
||||
};
|
||||
|
||||
/// Internal adapter used to route and allow implementations of formatting traits for foreign types.
|
||||
///
|
||||
|
|
@ -27,7 +34,15 @@ fn fmt(&self, f: &mut Formatter<'_>) -> Result {
|
|||
};
|
||||
}
|
||||
|
||||
use core::fmt::{Binary, LowerExp, LowerHex, Octal, Pointer, UpperExp, UpperHex};
|
||||
use core::fmt::{
|
||||
Binary,
|
||||
LowerExp,
|
||||
LowerHex,
|
||||
Octal,
|
||||
Pointer,
|
||||
UpperExp,
|
||||
UpperHex, //
|
||||
};
|
||||
impl_fmt_adapter_forward!(Debug, LowerHex, UpperHex, Octal, Binary, Pointer, LowerExp, UpperExp);
|
||||
|
||||
/// A copy of [`core::fmt::Display`] that allows us to implement it for foreign types.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user