Skip to content

Ambiguous usage of std::io::ErrorKind::InvalidInput #906

Closed
rust-lang/rust
#25246
@mzabaluev

Description

@mzabaluev

The error code InvalidInput on std::io::Error is currently used for at least two different purposes:

  • Indicate invalid programmatic usage, as in seeking to a negative position.
  • Report invalid data, such as when read_to_string reads content that is not valid UTF-8.

I think these two conditions are sufficiently different to deserve separate error codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions