summaryrefslogtreecommitdiff
path: root/crates/windows-kernel-rs/src/device.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-01-03 13:48:32 -0800
committerFuwn <[email protected]>2022-01-03 13:48:32 -0800
commita198195b5a030fcfa637440654429b551905a9d6 (patch)
treee7816ef0fdac61cd892175965b2b9a5ab0e8bdd3 /crates/windows-kernel-rs/src/device.rs
parentfix(windows-kernel-rs): mark unsafe functions (diff)
downloaddriver-a198195b5a030fcfa637440654429b551905a9d6.tar.xz
driver-a198195b5a030fcfa637440654429b551905a9d6.zip
chore(windows-kernel-rs): remove unnecessary unsafe blocks
Diffstat (limited to 'crates/windows-kernel-rs/src/device.rs')
-rw-r--r--crates/windows-kernel-rs/src/device.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/windows-kernel-rs/src/device.rs b/crates/windows-kernel-rs/src/device.rs
index 6bebc36..2ccb607 100644
--- a/crates/windows-kernel-rs/src/device.rs
+++ b/crates/windows-kernel-rs/src/device.rs
@@ -437,8 +437,8 @@ pub struct DeviceExtension {
/// # Safety
/// `unsafe`
pub unsafe extern "C" fn dispatch_device(device: *mut DEVICE_OBJECT, irp: *mut IRP) -> NTSTATUS {
- let stack_location = unsafe { &*IoGetCurrentIrpStackLocation(irp) };
- let device = unsafe { Device::from_raw(device) };
+ let stack_location = &*IoGetCurrentIrpStackLocation(irp);
+ let device = Device::from_raw(device);
let vtable = device.vtable();
match vtable.dispatch {