diff --git a/hashes/CHANGELOG.md b/hashes/CHANGELOG.md index ca96b020a..887776a59 100644 --- a/hashes/CHANGELOG.md +++ b/hashes/CHANGELOG.md @@ -1,3 +1,20 @@ +# unreleased + +* Change the default display direction of for tagged hashes to forwards. [#2707](https://github.com/rust-bitcoin/rust-bitcoin/pull/2707) + + Note please this usage if you need to display backward: + +```rust + sha256t_hash_newtype! { + /// Test detailed explanation. + struct NewTypeTag = hash_str("tag"); + + /// A test hash. + #[hash_newtype(backward)] + struct NewTypeHash(_); + } +``` + # 0.14.0 - 2024-03-21 * Bump MSRV to Rust version 1.56.1 [#2188](https://github.com/rust-bitcoin/rust-bitcoin/pull/2188) diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index 6627048cc..13b19c645 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -91,8 +91,8 @@ fn from_engine(e: sha256::HashEngine) -> Hash { /// pub struct FooTag = hash_str("foo"); /// /// /// A foo hash. -/// // Direction works just like in case of hash_newtype! macro. -/// #[hash_newtype(forward)] +/// // Direction works just like the hash_newtype! macro. +/// #[hash_newtype(backward)] /// pub struct FooHash(_); /// } /// ```