-
Notifications
You must be signed in to change notification settings - Fork 339
Add Stream::zip #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Stream::zip #204
Conversation
} | ||
} | ||
|
||
impl<A: Unpin + Stream, B: Unpin> Unpin for Zip<A, B> {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impl<A: Unpin + Stream, B: Unpin> Unpin for Zip<A, B> {} | |
impl<A: Unpin, B: Unpin> Unpin for Zip<A, B> {} |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 VecDeque
s here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VecDeque
s implement futures::stream::Stream
so they work as streams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
bors r+ |
Build succeeded
|
Ref #129 |
No description provided.