tor-c-equix: Fix clippy warning

Clippy found a transmute that could have been a reborrow.
This commit is contained in:
Micah Elizabeth Scott 2023-08-14 13:12:06 -07:00
parent 4ec193dcc5
commit 317a56c133

View File

@ -114,7 +114,7 @@ impl HashX {
},
}
unsafe extern "C" fn wrapper(buffer: *mut u64, callback: *mut c_void) {
let callback: &mut RngCallback = unsafe { mem::transmute(callback) };
let callback = &mut *(callback as *mut RngCallback);
buffer.write(callback(buffer.read()));
}
result