Skip to content

Commit 1bea7a8

Browse files
committed
Trivially replace wake_by_ref with wake.
`Waker::wake_by_ref` is allowed to be less efficient than `Waker::wake` and given we have ownership we might as well use the more efficient one.
1 parent cfe2a1e commit 1bea7a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/util/wakers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn complete_future(this: &Arc<Mutex<FutureState>>) -> bool {
146146
state.callbacks_made = true;
147147
}
148148
for (_, waker) in state.std_future_callbacks.drain(..) {
149-
waker.0.wake_by_ref();
149+
waker.0.wake();
150150
}
151151
for callback in state.callbacks_with_state.drain(..) {
152152
(callback)(this);

0 commit comments

Comments
 (0)