-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add read_all to std:io::Read to parallel write_all in std::io::Write. #23369
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Needs an RFC. |
RFC: rust-lang/rfcs#980 |
8dfa610
to
c69ea54
Compare
☔ The latest upstream changes (presumably #23430) made this pull request unmergeable. Please resolve the merge conflicts. |
In the event of EOF, read_all returns a result with the new error ShortRead(number of bytes successfully read). Fixes rust-lang#23174
c69ea54
to
a47d04a
Compare
What's the status of this? |
@archshift, seems that this will get merged once the RFC is accepted. |
/// particular number of bytes but only a smaller number of bytes could be | ||
/// read. | ||
#[stable(feature = "rust1", since = "1.0.0")] | ||
ShortRead(usize), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the size of the enum dramatically.
I'm going to close this in favor of the associated RFC, but we can certainly reopen if it's accepted! |
Fixes #23174