-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Ambiguous usage of std::io::ErrorKind::InvalidInput #906
Comments
cc rust-lang/rust#16666 (somewhat related) |
This clarification is needed, but does it count as a breaking change? To minimize impact to users it would be better to change the definition of InvalidInput to cover invalid data, and move programmer errors to a different error code? |
@bluss Yes, the change could go the other way around, and the name |
bors
added a commit
to rust-lang/rust
that referenced
this issue
Jun 1, 2015
This takes the cases from `InvalidInput` where a data format error was encountered. This is different from the documented semantics of `InvalidInput`, which more likely indicate a programming error. Fixes rust-lang/rfcs#906
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The error code
InvalidInput
onstd::io::Error
is currently used for at least two different purposes:read_to_string
reads content that is not valid UTF-8.I think these two conditions are sufficiently different to deserve separate error codes.
The text was updated successfully, but these errors were encountered: