From 4cca174f68c2cb364ea900de6584b660a42f5bcb Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 27 May 2017 20:45:00 +0100 Subject: [PATCH] Implement the Hash trait on Jid. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 04f8c2e..b78001b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ pub enum JidParseError { /// - A node/name, `node`, which is the optional part before the @. /// - A domain, `domain`, which is the mandatory part after the @ but before the /. /// - A resource, `resource`, which is the optional part after the /. -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, PartialEq, Eq, Hash)] pub struct Jid { /// The node part of the Jabber ID, if it exists, else None. pub node: Option,