diff options
| author | Fuwn <[email protected]> | 2022-01-03 13:48:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-01-03 13:48:32 -0800 |
| commit | a198195b5a030fcfa637440654429b551905a9d6 (patch) | |
| tree | e7816ef0fdac61cd892175965b2b9a5ab0e8bdd3 /crates/windows-kernel-rs/src/device.rs | |
| parent | fix(windows-kernel-rs): mark unsafe functions (diff) | |
| download | driver-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.rs | 4 |
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 { |