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 for decode and encode errors #6

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

wezm
Copy link
Contributor

@wezm wezm commented Feb 15, 2021

This PR implements the std::error::Error trait for decode::Error and encode::Error. This makes these error types more versatile for some uses. E.g. it permits them to work with an std Error trait object (Box<dyn Error>).

Since the current Debug impl for decode::Error seemed to be more of a Display impl (require by std Errror) I changed it as such and added a derived Debug impl.

@AldaronLau
Copy link
Owner

@wezm Looks good! Thanks again.

@AldaronLau AldaronLau merged commit b5b2a8b into AldaronLau:master Feb 15, 2021
@wezm wezm deleted the std-error branch February 15, 2021 03:53
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