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

tokio,io: add AsyncBufRead trait and AsyncBufReadExt::{read_until, read_line, lines} #1301

Merged
merged 5 commits into from
Jul 15, 2019
Merged

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Jul 15, 2019

This adds the following items:

  • Add AsyncBufRead - An async equivalent to io::BufRead
  • Add AsyncBufReadExt::read_until - An async equivalent to io::BufRead::read_until
  • Add AsyncBufReadExt::read_line - An async equivalent to io::BufRead::read_line
  • Add AsyncBufReadExt::lines - An async equivalent to io::BufRead::lines

The implementations are almost identical to the ones I added in futures-rs (rust-lang/futures-rs#1552, rust-lang/futures-rs#1556, rust-lang/futures-rs#1585).

cc #1203

r? @carllerche

@carllerche carllerche requested a review from seanmonstar July 15, 2019 17:38
Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

The PR looks great!

To keep a record, I still believe these changes to BufRead would help making the trait more useful...

@seanmonstar
Copy link
Member

Sorry, I wasn't fast enough on the merge button and now there's merge conflicts again :(

@taiki-e
Copy link
Member Author

taiki-e commented Jul 15, 2019

No worries. Rebased (and ci passed).

@seanmonstar seanmonstar merged commit 2dde2b4 into tokio-rs:master Jul 15, 2019
@taiki-e taiki-e deleted the io-async-buf-read branch July 15, 2019 18:52
@taiki-e taiki-e mentioned this pull request Jul 25, 2019
4 tasks
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.

2 participants