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

Could you please provide an impl std::error::Error for rasn::ber::de::Error? #119

Closed
hcldan opened this issue May 17, 2023 · 7 comments
Closed
Labels
area/types Related to rasn’s types for ASN.1 good first issue Good for newcomers help wanted Extra attention is needed kind/enhancement New feature or request

Comments

@hcldan
Copy link
Contributor

hcldan commented May 17, 2023

dtolnay/thiserror#235

I'm not sure why snafu doesn't do this for you... but I'd like to be able to use your errors with thiserror.

@XAMPPRocky
Copy link
Collaborator

Thank you for your issue! This wasn't originally possible, as Error wasn't always available in core if I remember correctly. I don't have the time to add it at the moment, but I'd accept a PR adding it. 🙂

@XAMPPRocky XAMPPRocky added kind/enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers area/types Related to rasn’s types for ASN.1 labels Jul 18, 2023
@XAMPPRocky
Copy link
Collaborator

Tried adding this, and it seems Error is still unavailable in core.

@Nicceboy
Copy link
Contributor

Nicceboy commented Aug 2, 2023

Here is the tracking issue rust-lang/rust#103765 of adding it to the core. Seems like it has made into the unstable.

@XAMPPRocky
Copy link
Collaborator

As of 1.81.0 this can now be added.

@Nicceboy
Copy link
Contributor

Relevant Snafu PR shepmaster/snafu#463

@shepmaster
Copy link

Updating to SNAFU 0.8.5 and adding the rust_1_81 feature should now implement core::error::Error.

@XAMPPRocky
Copy link
Collaborator

@shepmaster Thank you for your work on this, I've now pushed an update that includes snafu 0.8.5 with the feature. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/types Related to rasn’s types for ASN.1 good first issue Good for newcomers help wanted Extra attention is needed kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants