forked from rust-bitcoin/rust-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
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#3811: Introduce an unchecked constructor for the `…
…Amount` type 2042d91 api: Run just check-api (Tobin C. Harding) 04bae4b Use _unchecked in unit tests (Tobin C. Harding) 8e6784d Introduce Amount::from_sat_unchecked (Tobin C. Harding) f32af7d Use ua_sat throughout test function (Tobin C. Harding) 75f0afd Add local variable to use as constructor (Tobin C. Harding) 940a244 Replace Amount::from_sat(0) with ZERO (Tobin C. Harding) Pull request description: This is a small-ish changeset in order to mirror what was started in rust-bitcoin#3769 and reduce the diff in rust-bitcoin#3794 - Patch 1: Trivial refactor to use `Amount::ZERO`. - Patch 2: Add the constructor and refactor a single unit test to use it. - Patch 3: Use the two `_unchecked` constructors throughout `units/src/amount/tests.rs`. - Patch 4: Add the API text file changes. ACKs for top commit: jamillambert: ACK 2042d91 apoelstra: ACK 2042d91; successfully ran local tests Tree-SHA512: 8f9c3816509bb3fc0707cd4a47426130d001358e82273457b24170522644e10fe36b596e16500ce1778738f5546dfad592f1f3c4de552ec0afcb146442176cf5
- Loading branch information
Showing
6 changed files
with
78 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters