Rename APIError::MonitorUpdateFailed to MonitorUpdateInProgress
[rust-lightning] / lightning / src / util / wakers.rs
index b81dacbd0b33b32c5ce49c997aabc9064743a18e..e49c832ef67fd8aeb0dd25f193eb3fe179bb57c1 100644 (file)
 
 use alloc::sync::Arc;
 use core::mem;
-use core::time::Duration;
 use sync::{Condvar, Mutex};
 
-use prelude::{Box, Vec};
+use prelude::*;
 
 #[cfg(any(test, feature = "std"))]
-use std::time::Instant;
+use std::time::{Duration, Instant};
 
 use core::future::Future as StdFuture;
 use core::task::{Context, Poll};
 use core::pin::Pin;
 
-use prelude::*;
 
 /// Used to signal to one of many waiters that the condition they're waiting on has happened.
 pub(crate) struct Notifier {
@@ -294,7 +292,7 @@ mod tests {
        // waker, which we do here with a trivial Arc<AtomicBool> 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<AtomicBool>; assert!(!(*p).fetch_or(true, Ordering::SeqCst)); }
-       unsafe fn drop(ptr: *const ()) { let p = ptr as *mut Arc<AtomicBool>; Box::from_raw(p); }
+       unsafe fn drop(ptr: *const ()) { let p = ptr as *mut Arc<AtomicBool>; 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<AtomicBool>;