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

Implement AsyncRead for BufWriter and vice versa #2033

Merged
merged 1 commit into from Jan 21, 2020

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jan 16, 2020

This adds two impls:

  • impl<R: AsyncWrite> AsyncWrite for BufReader<R>
  • impl<W: AsyncRead> AsyncRead for BufWriter<W>

The motivation is that you often want to do something like: BufReader::new(BufWriter::new(socket)).

@tomaka
Copy link
Contributor Author

tomaka commented Jan 16, 2020

CI failure looks unrelated to my PR.

@cramertj cramertj merged commit fd62b0b into rust-lang:master Jan 21, 2020
@tomaka tomaka deleted the read-for-write branch January 21, 2020 21:30
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.

None yet

3 participants