rust-bitcoin-unsafe-fast/units/src
merge-script 014c4931be
Merge rust-bitcoin/rust-bitcoin#2951: Fix `Amount` decimals handling
3196c271ac Deprecate `Amount::fmt_value_in` (Martin Habovstiak)
467546fc0c Round `Amount` when requested precision is too low (Martin Habovstiak)
7c95a777c1 Fix `Amount` decimals handling (Martin Habovstiak)

Pull request description:

  Displaying with minimal number of zeros is the default in Rust and we want to follow it. This was originally implemented in #716 but #2604 reversed it claiming this is common, however it broke people who rely on minimal display (e.g. BIP21) without fixing the root cause of #2136.

  This reverts commit d887423efc adds a test to prevent this change and also fixes the problem with `{:0.8}` not working.

  Closes #2136
  Closes #2948

  Can we backport this one too?

ACKs for top commit:
  tcharding:
    ACK 3196c271ac
  apoelstra:
    ACK 3196c271ac I also really like how this reduces the complexity of the module, basically passing everything through to `display_in`

Tree-SHA512: 3221f83086ac55af3d4caad03fe2b619be303533bba12096040419d119600c8597938809e171662f11b515d469156b083b2072b901d445e4fdfc7b1062cf7b6a
2024-07-04 13:19:32 +00:00
..
locktime Remove wildcard from prelude import 2024-06-28 08:02:43 +01:00
amount.rs Merge rust-bitcoin/rust-bitcoin#2951: Fix `Amount` decimals handling 2024-07-04 13:19:32 +00:00
block.rs units: Add BlockHeight and BlockInterval types 2024-05-30 16:49:30 +10:00
fee_rate.rs Move unit types to units 2024-03-12 11:59:39 +11:00
lib.rs units: Add BlockHeight and BlockInterval types 2024-05-30 16:49:30 +10:00
parse.rs Flesh out hex unit parsing API 2024-05-24 14:32:47 +10:00
test_macros.rs fix: Manually implement serde traits 2024-03-20 11:33:14 +11:00
weight.rs Move unit types to units 2024-03-12 11:59:39 +11:00