Skip to content
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

Use TryStream in Sink::send_all #1946

Merged
merged 1 commit into from Nov 5, 2019

Conversation

cramertj
Copy link
Member

@cramertj cramertj commented Nov 5, 2019

Closes #1817

@@ -223,7 +223,7 @@ pub trait SinkExt<Item>: Sink<Item> {
&'a mut self,
stream: &'a mut St
) -> SendAll<'a, Self, St>
where St: Stream<Item = Item> + Unpin,
where &'a mut St: TryStream<Ok = Item, Error = Self::Error> + Unpin,
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about using TryStream + Stream bounds like Stream::forward - but I don't have any strong opinion on this.

@cramertj cramertj merged commit 812ce0a into rust-lang:master Nov 5, 2019
@cramertj cramertj deleted the sink-send-all-trystream branch November 5, 2019 17:34
@taiki-e taiki-e mentioned this pull request Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SinkExt::send_all should work with TryStream?
2 participants