• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bitcoindevkit / rust-esplora-client / 20858034035

09 Jan 2026 04:12PM UTC coverage: 86.704% (+0.05%) from 86.65%
20858034035

push

github

oleonardolima
Merge bitcoindevkit/rust-esplora-client#159: chore(submit_package): use `unwrap_or_default` instead of `.unwrap()`

<a class=hub.com/bitcoindevkit/rust-esplora-client/commit/<a class="double-link" href="https://git"><a class=hub.com/bitcoindevkit/rust-esplora-client/commit/ea9b5d1c0425344fa7289191dfd1f425dc11692a">ea9b5d1c0<a href="https://github.com/bitcoindevkit/rust-esplora-client/commit/de249b6af97d3c3e8bdd9766c40f7976c3bf563b"> refactor(blocking): propagate `hex-conservative` errors instead of `.unwrap()`. (Leonardo Lima)
<a class="double-link" href="https://github.com/bitcoindevkit/rust-esplora-client/commit/c2c5485c67b218d092b35e238a1c54da5692fcda">c2c5485c6</a> refactor(submit_package): use `unwrap_or_default` instead of `.unwrap()` (Leonardo Lima)

Pull request description:

  ### Description

  - use `unwrap_or_default()` instead of `.unwrap()`, ideally it should return a specific error variant, it'd be a breaking change though and can be added in a follow-up.
  - it's only possible to use the internal `minreq::Error` to wrap the `serde_json::Error`, but not the `reqwest::Error` as it does not have public constructors.

  ### Notes to the reviewers

  I personally wanted to remove the `.unwrap()` and properly handle the error, though the options I had in mind:
  - (i) adding a new `SerdeJson` variant is a breaking change; we can do it as a follow-up for 0.13.0
  - (ii) mapping and wrapping it into either minreq/reqwest errors is only possible in minreq, so I thought it's better to keep it standard and use `.unwrap_or_default()` on both for now.

ACKs for top commit:
  luisschwab:
    ACK ea9b5d1c0425344fa7289191dfd1f425dc11692a
  ValuedMammal:
    ACK ea9b5d1c0425344fa7289191dfd1f425dc11692a

Tree-SHA512: 860e9351e955abce5c7c2482377e03a92ae

2 of 5 new or added lines in 2 files covered. (40.0%)

1 existing line in 1 file now uncovered.

1402 of 1617 relevant lines covered (86.7%)

8.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.33
/src/blocking.rs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc