Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit d032b65

Browse files
authored
Merge pull request #93 from stevenroose/newtype-engine
Implement Hash::engine() for hash newtypes
2 parents 74468ab + 1590551 commit d032b65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ macro_rules! hash_newtype {
188188
const LEN: usize = <$hash as $crate::Hash>::LEN;
189189
const DISPLAY_BACKWARD: bool = $reverse;
190190

191+
fn engine() -> Self::Engine {
192+
<$hash as $crate::Hash>::engine()
193+
}
194+
191195
fn from_engine(e: Self::Engine) -> Self {
192196
Self::from(<$hash as $crate::Hash>::from_engine(e))
193197
}

0 commit comments

Comments
 (0)