Skip to content

Conversation

@tirr-c
Copy link
Contributor

@tirr-c tirr-c commented Sep 17, 2019

No description provided.

}
}

impl<A: Unpin + Stream, B: Unpin> Unpin for Zip<A, B> {}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
impl<A: Unpin + Stream, B: Unpin> Unpin for Zip<A, B> {}
impl<A: Unpin, B: Unpin> Unpin for Zip<A, B> {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work because of A: Stream bound on struct Zip.

///
/// let l: VecDeque<isize> = vec![1, 2, 3].into_iter().collect();
/// let r: VecDeque<isize> = vec![4, 5, 6, 7].into_iter().collect();
/// let mut s = l.zip(r);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused - how does this work? Are l and r streams or VecDeques here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VecDeques implement futures::stream::Stream so they work as streams.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@ghost
Copy link

ghost commented Sep 17, 2019

bors r+

bors bot added a commit that referenced this pull request Sep 17, 2019
204: Add Stream::zip r=stjepang a=tirr-c Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
@bors
Copy link
Contributor

bors bot commented Sep 17, 2019

Build succeeded

  • continuous-integration/travis-ci/push
@bors bors bot merged commit 73db46c into async-rs:master Sep 17, 2019
@yoshuawuyts
Copy link
Contributor

Ref #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants