Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH 1/2] rust: str: use the "kernel vertical" imports style
@ 2026-06-09 10:41 Miguel Ojeda
  2026-06-09 10:41 ` [PATCH 2/2] rust: str: clean unused import for Rust >= 1.98 Miguel Ojeda
  2026-06-09 11:45 ` [PATCH 1/2] rust: str: use the "kernel vertical" imports style Gary Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Miguel Ojeda @ 2026-06-09 10:41 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	rust-for-linux

Format the Rust prelude to use the "kernel vertical" imports style [1].

No functional changes intended.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/str.rs | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs
index a435674f05ea..4eae05e4baf9 100644
--- a/rust/kernel/str.rs
+++ b/rust/kernel/str.rs
@@ -3,14 +3,28 @@
 //! String representations.
 
 use crate::{
-    alloc::{flags::*, AllocError, KVec},
-    error::{to_result, Result},
-    fmt::{self, Write},
-    prelude::*,
+    alloc::{
+        flags::*,
+        AllocError,
+        KVec, //
+    },
+    error::{
+        to_result,
+        Result, //
+    },
+    fmt::{
+        self,
+        Write, //
+    },
+    prelude::*, //
 };
 use core::{
     marker::PhantomData,
-    ops::{Deref, DerefMut, Index},
+    ops::{
+        Deref,
+        DerefMut,
+        Index, //
+    }, //
 };
 
 pub use crate::prelude::CStr;
-- 
2.54.0


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

end of thread, other threads:[~2026-06-09 11:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 10:41 [PATCH 1/2] rust: str: use the "kernel vertical" imports style Miguel Ojeda
2026-06-09 10:41 ` [PATCH 2/2] rust: str: clean unused import for Rust >= 1.98 Miguel Ojeda
2026-06-09 10:45   ` Alice Ryhl
2026-06-09 11:45   ` Gary Guo
2026-06-09 11:45 ` [PATCH 1/2] rust: str: use the "kernel vertical" imports style Gary Guo

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