From: Matt Corallo Date: Mon, 14 Nov 2022 23:53:13 +0000 (+0000) Subject: Remove excess module X-Git-Tag: v0.0.113~40^2~3 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=bcf8687301a2f7522eec203bbc30e4286939221b;p=rust-lightning Remove excess module This appears to have been added with the intent of having a sealed trait, which was never committed. --- diff --git a/lightning/src/util/wakers.rs b/lightning/src/util/wakers.rs index 655fc9cf7..60684dcad 100644 --- a/lightning/src/util/wakers.rs +++ b/lightning/src/util/wakers.rs @@ -198,12 +198,10 @@ impl Future { } } -mod std_future { - use core::task::Waker; - pub struct StdWaker(pub Waker); - impl super::FutureCallback for StdWaker { - fn call(&self) { self.0.wake_by_ref() } - } +use core::task::Waker; +struct StdWaker(pub Waker); +impl FutureCallback for StdWaker { + fn call(&self) { self.0.wake_by_ref() } } /// (C-not exported) as Rust Futures aren't usable in language bindings. @@ -216,7 +214,7 @@ impl<'a> StdFuture for Future { Poll::Ready(()) } else { let waker = cx.waker().clone(); - state.callbacks.push(Box::new(std_future::StdWaker(waker))); + state.callbacks.push(Box::new(StdWaker(waker))); Poll::Pending } }