rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra d581207cb8
Merge rust-bitcoin/rust-bitcoin#1450: hashes: Do not implement `Deref`
b7a84d0c68 hashes: Do not implement Deref (Tobin C. Harding)

Pull request description:

  Currently we implement `Deref` for hashes. From the docs [0]

   > Deref should only be implemented for smart pointers to avoid confusion

  Furthermore because we implement `Deref` as well as implement `internals::hex::display::DisplayHex` for slices hashes get coerced into slices and `to_lower_hex_string` can be called on them, this is incorrect because `DisplayHex` does not account for hashes that display backwards so we end up with the wrong string.

  This is an API breaking change, and I have not built any other crates in our stack to check if anything breaks.

  [0] https://doc.rust-lang.org/std/ops/trait.Deref.html

ACKs for top commit:
  apoelstra:
    ACK b7a84d0c68
  sanket1729:
    ACK b7a84d0c68

Tree-SHA512: 573169095dd9f9032e3f685e3b0af3b569f1cb5368e1b2f37940504fd887592f46488abcfbe84107baf9c5453c7db47bc342a6bc273ff98cb0570ffacb549c21
2022-12-13 20:59:41 +00:00
..
contrib Fail CI if docs build throws warnings 2022-11-21 10:35:49 +11:00
embedded hashes: Do not implement Deref 2022-12-12 12:05:54 +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