Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current display code for `Error` is a little unusual. We typically just implement `Display` and if a `str` is needed use `format!`. Improve the `Error` type by doing - Remove the `as_str` function and implement `Display` directly. - Remove the 'secp: ' prefix of all the error messages. - Use a newly defined macro `write_err` that writes the error if `std` feature is not enabled so that no-std builds do not loose error info. Note: The `write_err` macro is currently being introduced in `rust-bitcoin` also. Elect to just duplicate it here and not share it between the crates.
- Loading branch information
Showing
2 changed files
with
34 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters