From: Micah Elizabeth Scott Date: Mon, 14 Aug 2023 20:12:06 +0000 (-0700) Subject: tor-c-equix: Fix clippy warning X-Git-Tag: tor-0.4.8.4~9^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=317a56c1335b2c775383b5b439c5ab28a6201b20;p=thirdparty%2Ftor.git tor-c-equix: Fix clippy warning Clippy found a transmute that could have been a reborrow. --- diff --git a/src/ext/equix/src/lib.rs b/src/ext/equix/src/lib.rs index 8eb163075a..716160b4d5 100644 --- a/src/ext/equix/src/lib.rs +++ b/src/ext/equix/src/lib.rs @@ -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