mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
tor-c-equix: Fix clippy warning
Clippy found a transmute that could have been a reborrow.
This commit is contained in:
parent
4ec193dcc5
commit
317a56c133
@ -114,7 +114,7 @@ impl HashX {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
unsafe extern "C" fn wrapper(buffer: *mut u64, callback: *mut c_void) {
|
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()));
|
buffer.write(callback(buffer.read()));
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
|
Loading…
Reference in New Issue
Block a user