diff --git a/src/image/digest.rs b/src/image/digest.rs index b91054db67..06f9bb038b 100644 --- a/src/image/digest.rs +++ b/src/image/digest.rs @@ -9,7 +9,7 @@ use std::str::FromStr; /// standards. Other digest algorithms may be added /// in the future, so this structure is marked as non-exhaustive. #[non_exhaustive] -#[derive(Clone, Debug, PartialEq, Eq)] +#[derive(Clone, Debug, PartialEq, Eq, Hash)] pub enum DigestAlgorithm { /// The SHA-256 algorithm. Sha256, @@ -95,7 +95,7 @@ fn char_is_encoded(c: char) -> bool { /// # } /// ``` -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, Hash)] pub struct Digest { /// The algorithm algorithm: DigestAlgorithm, @@ -202,7 +202,7 @@ impl FromStr for Digest { } /// A SHA-256 digest, guaranteed to be 64 lowercase hexadecimal ASCII characters. -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq, Hash)] pub struct Sha256Digest { digest: Box, }