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 Error #45

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented May 25, 2022

So that the usage of bitcoinconsensus::Error is more ergonomic for downstream users implement std::error::Error.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 4079e10

@tcharding
Copy link
Member Author

On review before merging I realised this breaks no-std by adding a hard dependency on std, I'll look into adding a std feature like we do elsewhere in the stack?

In order for the `bitcoinconsensus::Error` to be usable downstream we
should implement `Display` and conditionally, if we are in a `std`
environment, implement `std::error::Error`.

- Add a `std` feature
- Implement `core::fmt::Display`
- Conditionally implement `std::error::Error`
@tcharding
Copy link
Member Author

Force push contain newly added feature gating. Please re-review.

@tcharding tcharding requested a review from apoelstra May 25, 2022 22:46
@apoelstra
Copy link
Member

I guess I need to figure out how to make submodules work, so that I can test this repo locally :/.

Or maybe we could just convert to subtrees .... but maybe I'm opening a can of worms there.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 814cd71

@tcharding tcharding merged commit 435486f into rust-bitcoin:master Jun 6, 2022
@tcharding tcharding deleted the 05-25-implement-error branch June 8, 2022 04:56
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.

None yet

2 participants