rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 32afe5ae48
Merge rust-bitcoin/rust-bitcoin#1400: Add trait `FromStrHex` for tuple structs with single `u32` member
e00dfa9806 impl FromHexStr for structs with single u32 member (connormullett)

Pull request description:

  Closes: #1112

   - Adds new trait `FromStrHex` with 2 methods: `from_hex_str` and `from_hex_str_no_prefix`
   -  Impl new trait on each tuple struct with single u32 member. eg `Time(u32)`

  As stated in the issue, grep through codebase with `\(u32\)` and `\(pub u32\)` to see all implementations and verify none were missed.

  NonStandardSighashType is an error type and should never be constructed from a hex string. Therefore, it has been omitted from this change.

  Tests are somewhat redundant, but cover 4 cases each. 2 happy paths, 1 for each function. 1 case for malformed/invalid hex input, and 1 for calling no_prefix without a prefix

ACKs for top commit:
  Kixunil:
    ACK e00dfa9806
  apoelstra:
    ACK e00dfa9806

Tree-SHA512: 221faef7fc1fa8fdb4cba79cfae317a0b63984937c345c6ca2287123a078f38911cdc07db7589a88b7bc6fbecf389e9bcff47952728410510ffcfc1857e0f91f
2022-12-11 18:47:32 +00:00
..
contrib Fail CI if docs build throws warnings 2022-11-21 10:35:49 +11:00
embedded Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
examples Move the taproot module to crate root 2022-11-30 12:03:39 +11:00
fuzz Merge rust-bitcoin/rust-bitcoin#1284: Import bitcoin hashes 2022-11-18 18:32:41 +00:00
src Merge rust-bitcoin/rust-bitcoin#1400: Add trait `FromStrHex` for tuple structs with single `u32` member 2022-12-11 18:47:32 +00:00
tests Hotfix: Fix broken serde 2022-12-01 15:57:37 -08:00
CHANGELOG.md Move CHANGELOG to bitcoin crate 2022-11-08 08:40:44 +11:00
Cargo.toml Implement consensus encoding adapter for serde 2022-12-02 10:48:05 +01:00
build.rs Implement consensus encoding adapter for serde 2022-12-02 10:48:05 +01:00