rust-bitcoin-unsafe-fast/units/src
Tobin C. Harding 2ec1c2a044
units: Make from_int_btc_const take a 16 bit integer
The `from_int_btc_const` constructors are specifically designed for
easily creating amount types in const context but currently they return
an error which is annoying to handle in const context. If we make the
`whole_bitcoin` parameter a 16 bit integer this gives us a nicer const
constructor with the downside that it can only create values upto a
maximum of

- unsigned: 65_536
- signed: 32_767

That is plenty high enough for most use cases.

Then use the new `from_int_btc_const` in associated consts.

Note that because `from_sat` checks max (and min) values we must
define max and min from sats directly.
2025-03-18 14:49:34 +00:00
..
amount units: Make from_int_btc_const take a 16 bit integer 2025-03-18 14:49:34 +00:00
fee_rate units: replace a gazillion more macro calls with new macro 2025-02-25 20:31:45 +00:00
locktime Kill remaining mutants 2025-01-21 17:01:36 -06:00
block.rs 2025-01-12 automated rustfmt nightly 2025-01-12 01:23:13 +00:00
fee.rs Merge rust-bitcoin/rust-bitcoin#4157: Enforce MAX_MONEY invariant in amount types 2025-03-13 23:35:40 +00:00
internal_macros.rs units: extend op reference macro to handle generics and where clauses 2025-02-25 20:31:45 +00:00
lib.rs Rename timestamp module to time 2025-03-08 08:30:10 +11:00
parse.rs units: Improve code comment on macros 2025-02-28 08:47:11 +11:00
time.rs Rename timestamp module to time 2025-03-08 08:30:10 +11:00
weight.rs Merge rust-bitcoin/rust-bitcoin#4174: Improve weight 2025-03-06 15:58:59 +00:00