Skip to content

Commit

Permalink
muxers/yamux: Use existing Poll import (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Jun 3, 2022
1 parent 3611d69 commit c36a749
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions muxers/yamux/src/lib.rs
Expand Up @@ -427,10 +427,7 @@ impl<T> fmt::Debug for LocalIncoming<T> {
impl<T> Stream for Incoming<T> {
type Item = Result<yamux::Stream, YamuxError>;

fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
self.stream.as_mut().poll_next_unpin(cx)
}

Expand All @@ -444,10 +441,7 @@ impl<T> Unpin for Incoming<T> {}
impl<T> Stream for LocalIncoming<T> {
type Item = Result<yamux::Stream, YamuxError>;

fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
self.stream.as_mut().poll_next_unpin(cx)
}

Expand Down

0 comments on commit c36a749

Please sign in to comment.