Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Consider revisiting some details of Display for io::Error #37

Open
nox opened this issue Mar 20, 2021 · 5 comments
Open

Consider revisiting some details of Display for io::Error #37

nox opened this issue Mar 20, 2021 · 5 comments

Comments

@nox
Copy link

nox commented Mar 20, 2021

The implementation of Display for io::Error currently completely omits the kind of the error for errors created with io::Error::new.

Do you think it would be possible to change that and include it for all others whose kind is not io::ErrorKind::Other? I realise that this is probably a breaking change, but I wonder if there is that much code out there using io::Error::new with a kind different to io::ErrorKind::Other.

@JDuchniewicz
Copy link

Do we know the rationale behind not printing them in the first place? I presume that unwillingness to print out every member of the io::ErrorKind enum was the main reason.

@nox
Copy link
Author

nox commented Mar 27, 2021

Digging way too far in the past I've found out that it actually used to be that way.

@nox
Copy link
Author

nox commented Mar 27, 2021

It was then changed to always ignore the error kind for custom errors in this commit.

@nox
Copy link
Author

nox commented Mar 27, 2021

AFAICT, the PR never explains why that change was made. Do you remember, @alexcrichton?

@alexcrichton
Copy link
Member

Sorry, I do not.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants