|
Ran
|
Jobs
1
|
Files
126
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#4157: Enforce MAX_MONEY invariant in amount types <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/ab4ea7c13d08411044bd5f9c17457e926c80ed4d">ab4ea7c13 Enforce the MAX_MONEY invariant in amount types (Tobin C. Harding) Pull request description: Enforcing the `MAX_MONEY` invariant is quite involved because it means multiple things: - Constructing amounts is now fallible - Converting from unsigned to signed is now infallible - Taking the absolute value is now infallible - Integer overflow is eliminated in various places Details: - Update `from_sat` to check the invariant - Fix all docs including examples - Use the unchecked constructor in test code - Comment any other use of the unchecked constructor - Deprecate `unchecked_abs` - Fail serde (using the horrible string error variant) - Try not to use the unchecked constructor in rustdocs, no need to encourage unsuspecting users to use it. - Use `?` in rustdoc examples (required by Rust API guidlines) - Remove `TryFrom<Amount> for SignedAmount` because the conversion is now infallible. Add a `From` impl. - Fix the arbitrary impls - Maintain correct formatting - Remove private `check_max` function as its no longer needed Close #620 ACKs for top commit: apoelstra: ACK ab4ea7c13d08411044bd5f9c17457e926c80ed4d; successfully ran local tests Tree-SHA512: bec963d8e3d376c2d20862ef6f0ca312afb
85 of 103 new or added lines in 10 files covered. (82.52%)
13 existing lines in 3 files now uncovered.21788 of 26210 relevant lines covered (83.13%)
16832.95 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 9 |
80.0 |
-1.82% | units/src/amount/signed.rs |
| 7 |
83.33 |
-2.96% | units/src/amount/unsigned.rs |
| 1 |
94.74 |
-5.26% | bitcoin/src/lib.rs |
| 1 |
88.71 |
-2.27% | units/src/fee.rs |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 6 |
80.0 |
-1.82% | units/src/amount/signed.rs |
| 4 |
83.33 |
-2.96% | units/src/amount/unsigned.rs |
| 3 |
88.71 |
-2.27% | units/src/fee.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 13846653850.1 | 126 |
83.13 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|