Skip to content

Commit

Permalink
Add DigestHasher::new() alias for DigestHasher::default()
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi-D-coder committed May 13, 2024
1 parent 0a5b79e commit 780cdca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ impl<H: digest::Digest> Default for DigestHasher<H> {
}
}

impl<H: digest::Digest> DigestHasher<H> {
#[inline(always)]
pub fn new() -> Self {
Self::default()
}
}

impl<const LEN: usize, H: digest::Digest + digest::FixedOutputReset> PortableHasher<LEN>
for DigestHasher<H>
where
Expand Down

0 comments on commit 780cdca

Please sign in to comment.