Use thiserror macro to derive Error + Display traits #18

Merged
rib merged 1 commits from wip/rib/thiserror into master 2021-01-08 09:16:44 -08:00
rib commented 2021-01-08 06:05:51 -08:00 (Migrated from github.com)

Following up on https://github.com/acw/simple_asn1/issues/17...

This removes the manual implementation of Display + Error for
ASN1EncodeErr and uses the derive macro from thiserror to add
std Error and Display implementations for ANS1EncodeErr and
ASN1DecodeErr.

The unit tests seem to run with the change and I can confirm it
also unblocks me bumping my dependency on simple_asn1
in https://github.com/rib/jsonwebtokens as the api is again
compatible with the 0.4 api.

Following up on https://github.com/acw/simple_asn1/issues/17... This removes the manual implementation of Display + Error for ASN1EncodeErr and uses the derive macro from [thiserror](https://github.com/dtolnay/thiserror) to add std Error and Display implementations for ANS1EncodeErr and ASN1DecodeErr. The unit tests seem to run with the change and I can confirm it also unblocks me bumping my dependency on simple_asn1 in https://github.com/rib/jsonwebtokens as the api is again compatible with the 0.4 api.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: acw/simple_asn1#18