Skip to content

Commit 5e8c1b5

Browse files
test-runner: Replace addr_of with raw pointer syntax
1 parent 21db13e commit 5e8c1b5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uefi-test-runner/src/proto/load.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use alloc::vec::Vec;
66
use core::ffi::c_void;
77
use core::pin::Pin;
88
use core::ptr;
9-
use core::ptr::addr_of;
109
use uefi::proto::BootPolicy;
1110
use uefi::proto::device_path::build::DevicePathBuilder;
1211
use uefi::proto::media::load_file::{LoadFile, LoadFile2};
@@ -61,13 +60,14 @@ impl CustomLoadFile2Protocol {
6160

6261
unsafe fn install_protocol(handle: Handle, guid: Guid, protocol: &mut CustomLoadFile2Protocol) {
6362
unsafe {
64-
boot::install_protocol_interface(Some(handle), &guid, addr_of!(*protocol).cast()).unwrap();
63+
boot::install_protocol_interface(Some(handle), &guid, (&raw const *protocol).cast())
64+
.unwrap();
6565
}
6666
}
6767

6868
unsafe fn uninstall_protocol(handle: Handle, guid: Guid, protocol: &mut CustomLoadFile2Protocol) {
6969
unsafe {
70-
boot::uninstall_protocol_interface(handle, &guid, addr_of!(*protocol).cast()).unwrap();
70+
boot::uninstall_protocol_interface(handle, &guid, (&raw const *protocol).cast()).unwrap();
7171
}
7272
}
7373

0 commit comments

Comments
 (0)