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 to ease type erasure #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaulingMonkey
Copy link
Contributor

Box::from(...) is implemented by default for anything that
implements Error, and ? uses from by default, making this handy for
anything dealing with multiple error types.

  • Since CI targets 1.24.0, implement the soft-deprecated description()
  • Implementing Error requires implementing Display.
  • Also ignore warnings about not using &dyn Debug while we're at it.

Box<Error>::from(...) is implemented by default for anything that
implements Error, and `?` uses from by default, making this handy for
anything dealing with multiple error types.

- Since CI targets 1.24.0, implement the soft-deprecated description()
- Implementing Error requires implementing Display.
- Also ignore warnings about not using `&dyn Debug` while we're at it.
@Lokathor
Copy link
Owner

I wanted to go the opposite direction and have it be no_std, but we could probably put this behind a feature flag if so.

I'll let this sit a bit and think on it

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