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

Implement std::error::Error for Errors #27

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

not-my-profile
Copy link
Contributor

@not-my-profile not-my-profile commented Oct 21, 2021

This is handy because it for example makes the Errors type usable with anyhow/thiserror.

Implementing std::error::Error for error types is best practice.

Sidenote: I think it's weird that the enum is named in plural.

@brycx
Copy link
Owner

brycx commented Oct 21, 2021

Yes, this is def. a great idea. Don't know why this wasn't impl'd before.

Sidenote: I think it's weird that the enum is named in plural.

This is fair and I understand why haha. With the upcoming breaking changes, I'm open to renaming it.

@brycx brycx merged commit 9f6bc9a into brycx:master Oct 21, 2021
@not-my-profile
Copy link
Contributor Author

not-my-profile commented Oct 21, 2021

This is fair and I understand why haha. With the upcoming breaking changes, I'm open to renaming it.

Haha, ok great :) When we rename it we should also strip the Error from the variant names (as per the clippy lint).

@brycx
Copy link
Owner

brycx commented Oct 21, 2021

Yes, I also got annoyed by this earlier 👍

@brycx brycx mentioned this pull request Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants