From 9eabeb07cc292c142dc1441af3efb2e36c27dcba Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 Jan 2022 14:44:35 -0800 Subject: fmt(crate): `cargo fmt` --- crates/windows-kernel-rs/src/allocator.rs | 6 +++++- crates/windows-kernel-rs/src/memory.rs | 4 +--- crates/windows-kernel-rs/src/request.rs | 12 +++--------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/windows-kernel-rs/src/allocator.rs b/crates/windows-kernel-rs/src/allocator.rs index 9c9f996..f45cb1e 100644 --- a/crates/windows-kernel-rs/src/allocator.rs +++ b/crates/windows-kernel-rs/src/allocator.rs @@ -15,7 +15,11 @@ use crate::version::VersionInfo; /// See issue #52191. #[alloc_error_handler] -fn alloc_error(_: Layout) -> ! { loop { x86_64::instructions::hlt() } } +fn alloc_error(_: Layout) -> ! { + loop { + x86_64::instructions::hlt() + } +} lazy_static! { /// The version of Microsoft Windows that is currently running. This is used by diff --git a/crates/windows-kernel-rs/src/memory.rs b/crates/windows-kernel-rs/src/memory.rs index d2ad77b..b240cde 100644 --- a/crates/windows-kernel-rs/src/memory.rs +++ b/crates/windows-kernel-rs/src/memory.rs @@ -34,9 +34,7 @@ impl From for PhysicalAddress { // fn into(self) -> u64 { self.0 } // } impl From for u64 { - fn from(p: PhysicalAddress) -> Self { - p.0 - } + fn from(p: PhysicalAddress) -> Self { p.0 } } impl From for PhysicalAddress { diff --git a/crates/windows-kernel-rs/src/request.rs b/crates/windows-kernel-rs/src/request.rs index af77fd7..d33ed22 100644 --- a/crates/windows-kernel-rs/src/request.rs +++ b/crates/windows-kernel-rs/src/request.rs @@ -146,9 +146,7 @@ impl ReadRequest { // fn into(self) -> IoRequest { self.inner } // } impl From for IoRequest { - fn from(r: ReadRequest) -> Self { - r.inner - } + fn from(r: ReadRequest) -> Self { r.inner } } pub struct WriteRequest { @@ -204,9 +202,7 @@ impl WriteRequest { // fn into(self) -> IoRequest { self.inner } // } impl From for IoRequest { - fn from(w: WriteRequest) -> Self { - w.inner - } + fn from(w: WriteRequest) -> Self { w.inner } } pub struct IoControlRequest { @@ -276,7 +272,5 @@ impl IoControlRequest { // fn into(self) -> IoRequest { self.inner } // } impl From for IoRequest { - fn from(i: IoControlRequest) -> Self { - i.inner - } + fn from(i: IoControlRequest) -> Self { i.inner } } -- cgit v1.2.3