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

Add impl From<bincode::Error> for std::io::Error #227

Closed
imp opened this issue Feb 25, 2018 · 2 comments
Closed

Add impl From<bincode::Error> for std::io::Error #227

imp opened this issue Feb 25, 2018 · 2 comments

Comments

@imp
Copy link

@imp imp commented Feb 25, 2018

There is a reverse conversion, but this one is missing. It will help quite a lot when used with ? operator.

@glehmann
Copy link

@glehmann glehmann commented Nov 15, 2019

that would also make bincode::Error compatible with custom_error.
If there is no opposition to adding this feature, I may give it a try and propose a pull request.

See lovasoa/custom_error#21

@ZoeyR
Copy link
Collaborator

@ZoeyR ZoeyR commented Apr 1, 2020

implementing From<bincode::Error> for std::io::Error would be a lossy conversion. There are many error cases that would just get thrown away and From really isn't meant for lossy conversions

@ZoeyR ZoeyR closed this Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.