util: fix waker update condition in CancellationToken (#4497)

There was a missing exclamation mark in the condition we used to test
whether we need a waker update in `check_for_cancellation`.
This commit is contained in:
b-naber
2022-02-14 13:18:10 -08:00
committed by GitHub
parent 8fb15da8f8
commit 9a3ce91ef5
+1 -1
View File
@@ -824,7 +824,7 @@ impl CancellationTokenState {
let need_waker_update = wait_node
.task
.as_ref()
.map(|waker| waker.will_wake(cx.waker()))
.map(|waker| !waker.will_wake(cx.waker()))
.unwrap_or(true);
if need_waker_update {