diff --git a/src/join.rs b/src/join.rs index d681d2d..af8fc87 100644 --- a/src/join.rs +++ b/src/join.rs @@ -278,14 +278,14 @@ where // If one side is pending, we can't return Ready until that gets resolved. Because we // have already requested that our child streams wake us when it is possible to make // any kind of progress, we meet the requirements to return Poll::Pending. - (PollState::Item(a, t), PollState::Pending) => { - *this.state = JoinState::A(a, t); - Poll::Pending - } - (PollState::Pending, PollState::Item(b, t)) => { - *this.state = JoinState::B(b, t); - Poll::Pending - } + (PollState::Item(a, t), PollState::Pending) => Poll::Ready(PollResult::Item { + data: a, + ordering: t, + }), + (PollState::Pending, PollState::Item(b, t)) => Poll::Ready(PollResult::Item { + data: b, + ordering: t, + }), (PollState::Pending, PollState::Pending) => Poll::Pending, (PollState::Pending, PollState::NoneBefore) => Poll::Pending, (PollState::NoneBefore, PollState::Pending) => Poll::Pending,