// edition:2018
// aux-build:arc_wake.rs
-#![feature(async_await, await_macro, futures_api)]
+#![feature(async_await, await_macro)]
extern crate arc_wake;
}
impl ArcWake for Counter {
- fn wake(arc_self: &Arc<Self>) {
+ fn wake(self: Arc<Self>) {
+ Self::wake_by_ref(&self)
+ }
+ fn wake_by_ref(arc_self: &Arc<Self>) {
arc_self.wakes.fetch_add(1, atomic::Ordering::SeqCst);
}
}
if self.0 {
Poll::Ready(())
} else {
- cx.waker().wake();
+ cx.waker().wake_by_ref();
self.0 = true;
Poll::Pending
}