|
Ran
|
Jobs
1
|
Files
126
|
Run time
1min
|
Badge
README BADGES
|
push
github
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
| 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 |
| 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 |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 13975679298.1 | 126 |
83.39 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|