Skip to contentSkip to conversation

rust: mem: fix up formatting after merge

PATCH New Miguel Ojeda 1 participant 1 message Oct 22 Rust

lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: mem: fix up formatting after merge

In the merge 7be4bc52fd9e ("Merge tag 'driver-core-7.4-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core"),
the formatting in the conflict resolution doesn't match what make rustfmt wants to make it.

Instead of running rustfmt as-is, which would leave the TODO comment detached from the Alignment re-export it refers to, swap the two imports and add a newline to keep the import "blocks" with different visibilities separate [1].

---
Linus: please feel free to just take this directly since the pull is at the top. Otherwise, I can send it in a PR with a few other fixes if you prefer.

 rust/kernel/mem.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
rust/kernel/mem.rs +2 -1
index f811c9434a80..cd00289ded72 100644
@@ -2,9 +2,10 @@
 
 //! Basic utilities for dealing with memory, values, and types.
 
+use crate::prelude::*;
+
 // TODO: `Alignment` should be moved here as well, Rust moved it upstream in 1.96.
 pub use crate::ptr::Alignment;
-use crate::prelude::*;
 
 /// Trait indicating that [`Align<N>`] is a valid alignment.
 pub trait ValidAlign {

base-commit: 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614 --
2.56.0