diff options
| author | Fuwn <[email protected]> | 2022-01-03 14:44:35 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-01-03 14:44:35 -0800 |
| commit | 9eabeb07cc292c142dc1441af3efb2e36c27dcba (patch) | |
| tree | fba78e449ea9659973caedc389016fd368ce94fa | |
| parent | chore(windows-kernel-rs): remove unused statement (diff) | |
| download | driver-9eabeb07cc292c142dc1441af3efb2e36c27dcba.tar.xz driver-9eabeb07cc292c142dc1441af3efb2e36c27dcba.zip | |
fmt(crate): `cargo fmt`
| -rw-r--r-- | crates/windows-kernel-rs/src/allocator.rs | 6 | ||||
| -rw-r--r-- | crates/windows-kernel-rs/src/memory.rs | 4 | ||||
| -rw-r--r-- | 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<u64> for PhysicalAddress { // fn into(self) -> u64 { self.0 } // } impl From<PhysicalAddress> for u64 { - fn from(p: PhysicalAddress) -> Self { - p.0 - } + fn from(p: PhysicalAddress) -> Self { p.0 } } impl From<PHYSICAL_ADDRESS> 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<ReadRequest> 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<WriteRequest> 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<IoControlRequest> for IoRequest { - fn from(i: IoControlRequest) -> Self { - i.inner - } + fn from(i: IoControlRequest) -> Self { i.inner } } |