diff --git a/waku-bindings/src/general/messagehash.rs b/waku-bindings/src/general/messagehash.rs index 1c55515..6b199a9 100644 --- a/waku-bindings/src/general/messagehash.rs +++ b/waku-bindings/src/general/messagehash.rs @@ -4,11 +4,11 @@ use serde::{Deserialize, Deserializer, Serialize}; use std::convert::TryInto; use std::fmt; use std::fmt::Write; -use std::hash::{Hash, Hasher}; +use std::hash::Hash; use std::str::FromStr; /// Waku message hash, hex encoded sha256 digest of the message -#[derive(Debug, Serialize, PartialEq, Eq, Clone)] +#[derive(Debug, Serialize, PartialEq, Eq, Clone, Hash)] pub struct MessageHash([u8; 32]); impl MessageHash { @@ -20,13 +20,6 @@ impl MessageHash { } } -impl Hash for MessageHash { - fn hash(&self, state: &mut H) { - // Use the inner array to contribute to the hash - self.0.hash(state); - } -} - impl FromStr for MessageHash { type Err = String;