Skip to content

Commit fc1ce3a

Browse files
alvinsun039ojeda
authored andcommitted
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>
1 parent 6c77b5f commit fc1ce3a

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

rust/kernel/fmt.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
//!
55
//! This module is intended to be used in place of `core::fmt` in kernel code.
66
7-
pub use core::fmt::{Arguments, Debug, Error, Formatter, Result, Write};
7+
pub use core::fmt::{
8+
Arguments,
9+
Debug,
10+
Error,
11+
Formatter,
12+
Result,
13+
Write, //
14+
};
815

916
/// Internal adapter used to route and allow implementations of formatting traits for foreign types.
1017
///
@@ -27,7 +34,15 @@ macro_rules! impl_fmt_adapter_forward {
2734
};
2835
}
2936

30-
use core::fmt::{Binary, LowerExp, LowerHex, Octal, Pointer, UpperExp, UpperHex};
37+
use core::fmt::{
38+
Binary,
39+
LowerExp,
40+
LowerHex,
41+
Octal,
42+
Pointer,
43+
UpperExp,
44+
UpperHex, //
45+
};
3146
impl_fmt_adapter_forward!(Debug, LowerHex, UpperHex, Octal, Binary, Pointer, LowerExp, UpperExp);
3247

3348
/// A copy of [`core::fmt::Display`] that allows us to implement it for foreign types.

0 commit comments

Comments
 (0)