We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa8fc28 commit 55a31e5Copy full SHA for 55a31e5
futures-util/src/future/future/remote_handle.rs
@@ -95,11 +95,11 @@ impl<Fut: Future> Future for Remote<Fut> {
95
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
96
let this = self.project();
97
98
- if let Poll::Ready(_) = this.tx.as_mut().unwrap().poll_canceled(cx) {
99
- if !this.keep_running.load(Ordering::SeqCst) {
100
- // Cancelled, bail out
101
- return Poll::Ready(())
102
- }
+ if this.tx.as_mut().unwrap().poll_canceled(cx).is_ready()
+ && !this.keep_running.load(Ordering::SeqCst)
+ {
+ // Cancelled, bail out
+ return Poll::Ready(());
103
}
104
105
let output = ready!(this.future.poll(cx));
0 commit comments