rust-bitcoin-unsafe-fast/hashes/src
Tobin C. Harding b7a84d0c68 hashes: Do not implement Deref
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.

[0] https://doc.rust-lang.org/std/ops/trait.Deref.html
2022-12-12 12:05:54 +11:00
..
cmp.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
error.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
hash160.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
hex.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
hmac.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
impls.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
internal_macros.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
lib.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
ripemd160.rs Fix new clippy warnings 2022-12-01 15:59:08 -08:00
serde_macros.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
sha1.rs Fix new clippy warnings 2022-12-01 15:59:08 -08:00
sha256.rs Fix new clippy warnings 2022-12-01 15:59:08 -08:00
sha256d.rs Fix new clippy warnings 2022-12-01 15:59:08 -08:00
sha256t.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
sha512.rs Fix new clippy warnings 2022-12-01 15:59:08 -08:00
siphash24.rs Import bitcoin_hashes crate into hashes 2022-11-08 08:58:09 +11:00
util.rs hashes: Do not implement Deref 2022-12-12 12:05:54 +11:00