Skip to content

Commit 55a31e5

Browse files
committed
Fix clippy::redundant_pattern_matching warning
1 parent aa8fc28 commit 55a31e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

futures-util/src/future/future/remote_handle.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ impl<Fut: Future> Future for Remote<Fut> {
9595
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> {
9696
let this = self.project();
9797

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-
}
98+
if this.tx.as_mut().unwrap().poll_canceled(cx).is_ready()
99+
&& !this.keep_running.load(Ordering::SeqCst)
100+
{
101+
// Cancelled, bail out
102+
return Poll::Ready(());
103103
}
104104

105105
let output = ready!(this.future.poll(cx));

0 commit comments

Comments
 (0)