Skip to content

Unstable feature: copy takes arguments by value #471

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

Merged
2 commits merged into from Nov 9, 2019
Merged

Unstable feature: copy takes arguments by value #471

2 commits merged into from Nov 9, 2019

Conversation

ghost
Copy link

@ghost ghost commented Nov 7, 2019

This just makes our io::copy() more generic so that one can do this:

io::copy(&stream, &stream).await?;

instead of:

let (reader, writer) = &mut (&stream, &stream);
io::copy(reader, writer).await?;

This feature is only available when unstable feature flag is turned out.

cc #365

@ghost ghost requested a review from yoshuawuyts November 7, 2019 13:40
@ghost ghost mentioned this pull request Nov 7, 2019
@yoshuawuyts
Copy link
Contributor

@stjepang could you say more about why both versions are kept? I was thinking we keep only a single version around, but mark it unstable.

I don't think we'd be able to stabilize this way because it would break existing code wouldn't it? Or is the current trait forward-compatible?

@ghost ghost merged commit 9e185f1 into async-rs:master Nov 9, 2019
@ghost ghost deleted the io-copy-consuming branch November 9, 2019 15:59
This pull request was closed.
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.

1 participant