Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge rust-bitcoin#3681: hashes: Documents C-QUESTION-MARK
91268bb Examples use ?, not try!, not unwrap (Jamil Lambert, PhD) Pull request description: To conform to Rust API guidelines in Issue rust-bitcoin#3633 examples should use ?, not try!, not unwrap (C-QUESTION-MARK). The examples were originally labelled `## Commonly used operations`, change the label to `# Examples`. Replace `unwrap()` with `expect()` since these cases cannot error. Two uses of `unwrap()` have been left since they are in a set of three writes with an engine that can not error and the first case uses `expect()` with the relevant error message. ACKs for top commit: tcharding: ACK 91268bb sanket1729: ACK 91268bb apoelstra: ACK 91268bb; successfully ran local tests Tree-SHA512: 4c7836b2e8d67ac5d6f85229ca9ad3c9c5f0f1dc7062bda398c48ef72fd6bb965effee313151f70c86bd7cebda78a651cc12b2d59bc331d689089cf17b8c3dc8
- Loading branch information