From: Matt Corallo Date: Fri, 9 Sep 2022 17:09:27 +0000 (+0000) Subject: Fix (really dumb) warning rustc introduced in latest beta X-Git-Tag: v0.0.111~4^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=610511ced61d601b928368f633d33be2719b5be8;p=rust-lightning Fix (really dumb) warning rustc introduced in latest beta --- diff --git a/lightning/src/util/wakers.rs b/lightning/src/util/wakers.rs index 7ab9aca0e..01012fff7 100644 --- a/lightning/src/util/wakers.rs +++ b/lightning/src/util/wakers.rs @@ -293,7 +293,7 @@ mod tests { // waker, which we do here with a trivial Arc data element to track woke-ness. const WAKER_V_TABLE: RawWakerVTable = RawWakerVTable::new(waker_clone, wake, wake_by_ref, drop); unsafe fn wake_by_ref(ptr: *const ()) { let p = ptr as *const Arc; assert!(!(*p).fetch_or(true, Ordering::SeqCst)); } - unsafe fn drop(ptr: *const ()) { let p = ptr as *mut Arc; Box::from_raw(p); } + unsafe fn drop(ptr: *const ()) { let p = ptr as *mut Arc; let _freed = Box::from_raw(p); } unsafe fn wake(ptr: *const ()) { wake_by_ref(ptr); drop(ptr); } unsafe fn waker_clone(ptr: *const ()) -> RawWaker { let p = ptr as *const Arc;