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

@drewkett drewkett commented Sep 17, 2021

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.
@drewkett drewkett requested a review from taiki-e as a code owner Sep 17, 2021
Copy link
Member

@taiki-e taiki-e left a comment

Thanks!

@taiki-e taiki-e merged commit cc670fd into rust-lang:master Sep 18, 2021
22 checks passed
@taiki-e taiki-e added 0.3-backport: pending A-stream labels Nov 22, 2021
taiki-e pushed a commit that referenced this issue 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 labels Nov 23, 2021
taiki-e pushed a commit that referenced this issue 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 issue 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