hashes: Implement Eq and Hash.

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-29 05:14:49 +01:00
commit 33994c1042

View file

@ -16,7 +16,7 @@ use ns;
use base64; use base64;
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Algo { pub enum Algo {
Sha_1, Sha_1,
Sha_256, Sha_256,
@ -68,7 +68,7 @@ impl IntoAttributeValue for Algo {
} }
} }
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Hash { pub struct Hash {
pub algo: Algo, pub algo: Algo,
pub hash: Vec<u8>, pub hash: Vec<u8>,