rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra beaa2db7e5
amount: add from_sat_i32 and from_sat_u32 methods for small constants
We have a ton of calls to `from_sat_unchecked` for small constants which
were clearly in range, e.g. in fee.rs. Add a new constfn for these
cases. Don't bother making a generic Into<u32>/Into<u16> variant because
there isn't an obvious name for it.

There are 7 instances where we're using this method with values that are
out of range, which we leave as from_sat_unchecked for now.
2025-03-18 19:27:53 +00:00
..
contrib Remove rust-ordered dependency 2025-02-18 13:36:07 +11:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples amount: add from_sat_i32 and from_sat_u32 methods for small constants 2025-03-18 19:27:53 +00:00
src amount: add from_sat_i32 and from_sat_u32 methods for small constants 2025-03-18 19:27:53 +00:00
tests 2025-03-16 automated rustfmt nightly 2025-03-16 01:25:25 +00:00
CHANGELOG.md Grab missing changelog 2025-02-25 19:35:43 +11:00
Cargo.toml Remove references to cfg(mutate) from lint allow - no longer allowed 2025-03-10 12:45:57 +08:00