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

rust-bitcoin / rust-bitcoin / 13975679298
83%

Build:
DEFAULT BRANCH: master
Ran 20 Mar 2025 05:33PM UTC
Jobs 1
Files 126
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Mar 2025 05:32PM UTC coverage: 83.386% (+0.3%) from 83.083%
13975679298

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4256: Followups to #4157: remove Amount::from_sat_unchecked

295852111 amount: remove from_sat_unchecked (Andrew Poelstra)
d0d7a1560 amount: move MIN/MAX constants and constructors inside the privacy boundary (Andrew Poelstra)
004d07318 amount: return i64 from parse_signed_to_satoshi (Andrew Poelstra)
3370c14d7 amount: stop using from_sat_unchecked in tests (Andrew Poelstra)
05c8b043f tests: replace Amount::from_sat_unchecked with from_sat.unwrap (Andrew Poelstra)
beaa2db7e amount: add from_sat_i32 and from_sat_u32 methods for small constants (Andrew Poelstra)
82d9d1aee amount: rename `from_int_btc_const` unctions to hungarian ones (Andrew Poelstra)
2ec1c2a04 units: Make from_int_btc_const take a 16 bit integer (Tobin C. Harding)

Pull request description:

  This does some followups to #4157.

  It pulls in #4254, which changes the signature of `Amount::from_int_btc_const` and also replaces a `checked_mul` which can't ever fail with a `*`.

  It then renames `from_int_btc_const` to `from_btc_u16`/`from_btc_i16` as appropriate, since these names reflect what the function does. It also adds an analogous method for making `Amount`s from sats rather than BTC.

  Then it systematically removes every instance of `from_sat_unchecked`. There wind up being 7 instances in tests that I just added unwraps() to, plus one instance where we had `let sat = Amount::from_sat_unchecked` which I also added an unwrap() to.

  In the real code, there was one instance (`Amount::to_signed`) where I needed to add an `expect`. Every other instance I was able to remove, by refactoring logic to use the error case as appropriate.

ACKs for top commit:
  tcharding:
    ACK 2958521117e6ec3db98ec42c490b3dfe... (continued)

83 of 93 new or added lines in 8 files covered. (89.25%)

3 existing lines in 3 files now uncovered.

21923 of 26291 relevant lines covered (83.39%)

16845.64 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
81.05
1.05% units/src/amount/signed.rs
3
83.33
0.0% units/src/amount/unsigned.rs
1
88.78
-0.14% units/src/amount/mod.rs

Coverage Regressions

Lines Coverage ∆ File
1
88.78
-0.14% units/src/amount/mod.rs
1
81.05
1.05% units/src/amount/signed.rs
1
83.33
0.0% units/src/amount/unsigned.rs
Jobs
ID Job ID Ran Files Coverage
1 13975679298.1 20 Mar 2025 05:33PM UTC 126
83.39
GitHub Action Run
Source Files on build 13975679298
  • Tree
  • List 126
  • Changed 14
  • Source Changed 11
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13975679298
  • e0be90d1 on github
  • Prev Build on master (#13923187550)
  • Next Build on master (#13977478725)
  • Delete
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