]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove excess module
authorMatt Corallo <git@bluematt.me>
Mon, 14 Nov 2022 23:53:13 +0000 (23:53 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 16 Nov 2022 00:21:41 +0000 (00:21 +0000)
This appears to have been added with the intent of having a sealed
trait, which was never committed.

lightning/src/util/wakers.rs

index 655fc9cf7ed5db8f6bfbbc9285eb3c6bef94f037..60684dcadaf9f129a389f569de6f97f72e7125f7 100644 (file)
@@ -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
                }
        }