diff --git a/crates/librqbit/src/merge_streams.rs b/crates/librqbit/src/merge_streams.rs index 35205d4..c3848e5 100644 --- a/crates/librqbit/src/merge_streams.rs +++ b/crates/librqbit/src/merge_streams.rs @@ -36,11 +36,7 @@ fn poll_two + Unpin, S2: Stream + Unpin>( let s1p = s1.poll_next_unpin(cx); match s1p { Poll::Ready(Some(v)) => Poll::Ready(Some(v)), - Poll::Ready(None) => match s2.poll_next_unpin(cx) { - Poll::Ready(Some(v)) => Poll::Ready(Some(v)), - Poll::Ready(None) => Poll::Ready(None), - Poll::Pending => Poll::Pending, - }, + Poll::Ready(None) => s2.poll_next_unpin(cx), Poll::Pending => match s2.poll_next_unpin(cx) { Poll::Ready(Some(v)) => Poll::Ready(Some(v)), Poll::Ready(None) | Poll::Pending => Poll::Pending,