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

Fix Unusable Sink Implementation on Scan #2499

Merged
merged 1 commit into from Sep 18, 2021

Conversation

drewkett
Copy link
Contributor

The Sink implementation for futures::stream::Scan has generic bounds on it that require the stream and state types on Scan to be the same type, which naturally makes it not useful to use the implementation. This change adds an extra generic to the Sink implementation to separate out the type of the state argument in Scan.

The current Sink implementation on stream::Scan requires the stream and
state types are the same which doesn't practically allow that
implementation to be used. This adds a separate generic to the Sink
implementation for state.
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e taiki-e merged commit cc670fd into rust-lang:master Sep 18, 2021
@taiki-e taiki-e added 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. A-stream Area: futures::stream labels Nov 22, 2021
taiki-e pushed a commit that referenced this pull request Nov 23, 2021
The current Sink implementation on stream::Scan requires the stream and
state types are the same which doesn't practically allow that
implementation to be used. This adds a separate generic to the Sink
implementation for state.
@taiki-e taiki-e mentioned this pull request Nov 23, 2021
@taiki-e taiki-e added 0.3-backport: completed and removed 0.3-backport: pending The maintainer accepted to backport this to the 0.3 branch, but backport has not been done yet. labels Nov 23, 2021
taiki-e pushed a commit that referenced this pull request Nov 23, 2021
The current Sink implementation on stream::Scan requires the stream and
state types are the same which doesn't practically allow that
implementation to be used. This adds a separate generic to the Sink
implementation for state.
taiki-e pushed a commit that referenced this pull request Nov 23, 2021
The current Sink implementation on stream::Scan requires the stream and
state types are the same which doesn't practically allow that
implementation to be used. This adds a separate generic to the Sink
implementation for state.
@taiki-e taiki-e mentioned this pull request Nov 23, 2021
@taiki-e
Copy link
Member

taiki-e commented Nov 23, 2021

Published in 0.3.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants