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

StreamExt::forward should be TryStreamExt::forward #2004

Closed
benesch opened this issue Dec 13, 2019 · 0 comments · Fixed by #2469
Closed

StreamExt::forward should be TryStreamExt::forward #2004

benesch opened this issue Dec 13, 2019 · 0 comments · Fixed by #2469
Labels
A-stream Area: futures::stream C-feature-request

Comments

@benesch
Copy link

benesch commented Dec 13, 2019

The current implementation of StreamExt::forward should actually be in TryStreamExt as try_forward, I think, because it requires a fallible stream. StreamExt should then provide a forward method that does not require the sink to produce Results.

In other words the fix that merged in #1946 doesn't much sense to me. The code that was there prior to #1946 should be resurrected as StreamExt::forward, as the code that is there now should be TryStreamExt::try_forward.

Or is there some edge case that I'm missing? Happy to submit a PR if what I described above seems reasonable.

/cc @cramertj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stream Area: futures::stream C-feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants