rust-bitcoin-unsafe-fast/units/src
merge-script 6501b0d781
Merge rust-bitcoin/rust-bitcoin#3666: Implement serde modules for `FeeRate`
f5eb8f4747 api: Run just check-api (Tobin C. Harding)
472b1d3ff3 units: Add serde regression test (Tobin C. Harding)
dedae8acf2 Implement custom serde modules for FeeRate (Tobin C. Harding)
d94e5f03e6 Move fee_rate.rs to module (Tobin C. Harding)
c3c1f6f82d Add missing license comment to test file (Tobin C. Harding)

Pull request description:

  Implement and enforce explicit unit when serializing. This is as we do for `Amount` (see #3672 for similar).

  To test it, and as part of the 1.0 effort; add regression tests for `serde` stuff in `units`.

  With this applied one must use attributes to serialize `FeeRate`.

  ```rust
      #[derive(Serialize, Deserialize)]
      pub struct Foo {
          #[serde(with = "bitcoin_units::fee_rate::serde::as_sat_per_kwu")]
          pub fee_rate: FeeRate,
      }
  ```

ACKs for top commit:
  apoelstra:
    ACK f5eb8f4747a7cd303cad2b7f8f442bb31862c52a; successfully ran local tests; great idea!

Tree-SHA512: 0968ead568b1e3142efd4c0e856192ddde0f441de84215cbb0950b60a56922f1abaf6d4ccfe243b722a6883c0a927d26bcfba979acf3ca84c4f21baba73af764
2025-01-03 16:31:34 +00:00
..
amount Use _unchecked in unit tests 2024-12-30 06:36:09 +11:00
fee_rate Implement custom serde modules for FeeRate 2024-12-28 08:15:13 +11:00
locktime Merge rust-bitcoin/rust-bitcoin#3777: Implement Arbitrary for units types 2024-12-21 17:30:19 +00:00
block.rs Merge rust-bitcoin/rust-bitcoin#3777: Implement Arbitrary for units types 2024-12-21 17:30:19 +00:00
internal_macros.rs 2024-12-22 automated rustfmt nightly 2024-12-22 01:21:54 +00:00
lib.rs units: Move excluded lints to manifest 2024-12-18 08:25:12 +11:00
parse.rs units: Add all pedantic lints 2024-12-18 08:25:12 +11:00
weight.rs units: Add all pedantic lints 2024-12-18 08:25:12 +11:00