refactor algorithms to be unit structs

This commit is contained in:
sinui0
2024-07-31 19:00:58 +09:00
parent d920a37b58
commit b07210c01b
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ use sha2::{digest::FixedOutput, Digest, Sha256};
///
/// [`Hasher`]: crate::Hasher
#[derive(Default, Clone)]
pub struct Sha256Algorithm {}
pub struct Sha256Algorithm;
impl Hasher for Sha256Algorithm {
type Hash = [u8; 32];

View File

@@ -33,7 +33,7 @@ use sha2::{digest::FixedOutput, Digest, Sha384};
///
/// [`Hasher`]: crate::Hasher
#[derive(Default, Clone)]
pub struct Sha384Algorithm {}
pub struct Sha384Algorithm;
impl Hasher for Sha384Algorithm {
type Hash = [u8; 48];