From 340eced7ac68ff04e33fb63a675da9491bda8680 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 Jan 2022 14:17:31 -0800 Subject: fix(windows-kernel-rs): simplification --- crates/windows-kernel-rs/src/allocator.rs | 2 +- crates/windows-kernel-rs/src/device.rs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/windows-kernel-rs/src/allocator.rs b/crates/windows-kernel-rs/src/allocator.rs index 7b1efc8..2cb1515 100644 --- a/crates/windows-kernel-rs/src/allocator.rs +++ b/crates/windows-kernel-rs/src/allocator.rs @@ -15,7 +15,7 @@ use crate::version::VersionInfo; /// See issue #52191. #[alloc_error_handler] -fn alloc_error(_: Layout) -> ! { loop {} } +fn alloc_error(_: Layout) -> ! { loop {} } // core::panic!() lazy_static! { /// The version of Microsoft Windows that is currently running. This is used by diff --git a/crates/windows-kernel-rs/src/device.rs b/crates/windows-kernel-rs/src/device.rs index 2ccb607..5c36d3a 100644 --- a/crates/windows-kernel-rs/src/device.rs +++ b/crates/windows-kernel-rs/src/device.rs @@ -30,10 +30,11 @@ pub enum Access { impl Access { pub fn is_exclusive(&self) -> bool { - match *self { - Access::Exclusive => true, - _ => false, - } + // match *self { + // Access::Exclusive => true, + // _ => false, + // } + matches!(*self, Access::Exclusive) } } -- cgit v1.2.3