From my reading of the new sanity rules (#4090) we should only have a single constructor that accesses the inner field of the amount types. Furthermore we have one const constructor inside the privacy boundry and a couple outside. Move the const constructors outside of the privacy boundry. Internal change only. Please note The function being inside privacy boundary allows it to not have the "runtime" check (most likely optimized-away after inlining). But if we wanted to get rid of that check we should have _unchecked method instead. But we don't want that (yet), since the check here will have zero performance impact in optimized builds and it's not worth the cost of dealing with unchecked constructors to optimize debug builds. |
||
---|---|---|
.. | ||
contrib | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md |
README.md
Bitcoin Units
This crate provides basic Bitcoin numeric units such as Amount
.
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.63.0.
Licensing
The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.