Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH] rust: fmt: use vertical import style
@ 2026-05-12  9:21 Ke Sun
  2026-05-12 16:07 ` Gary Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Ke Sun @ 2026-05-12  9:21 UTC (permalink / raw)
  To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: rust-for-linux, Ke Sun

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>
---
 rust/kernel/fmt.rs | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/fmt.rs b/rust/kernel/fmt.rs
index 1e8725eb44ed7..73afbc51ba33a 100644
--- a/rust/kernel/fmt.rs
+++ b/rust/kernel/fmt.rs
@@ -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.

---
base-commit: 50897c955902c93ae71c38698abb910525ebdc89
change-id: 20260512-clean-fmt-use-5c2289d13741

Best regards,
-- 
Ke Sun <sunke@kylinos.cn>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rust: fmt: use vertical import style
  2026-05-12  9:21 [PATCH] rust: fmt: use vertical import style Ke Sun
@ 2026-05-12 16:07 ` Gary Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Gary Guo @ 2026-05-12 16:07 UTC (permalink / raw)
  To: Ke Sun, Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Danilo Krummrich
  Cc: rust-for-linux

On Tue May 12, 2026 at 10:21 AM BST, Ke Sun wrote:
> 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>

> ---
>  rust/kernel/fmt.rs | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-12 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  9:21 [PATCH] rust: fmt: use vertical import style Ke Sun
2026-05-12 16:07 ` Gary Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox