From e8a7d909c190dd0cfe2f5d38c9a9443c97cd36c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 29 May 2023 13:59:05 +0200 Subject: [PATCH] parsers: derive PartialEq on Iq too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- parsers/src/iq.rs | 4 ++-- parsers/src/stanza_error.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/parsers/src/iq.rs b/parsers/src/iq.rs index ccd55972..74cf019a 100644 --- a/parsers/src/iq.rs +++ b/parsers/src/iq.rs @@ -23,7 +23,7 @@ pub trait IqSetPayload: TryFrom + Into {} pub trait IqResultPayload: TryFrom + Into {} /// Represents one of the four possible iq types. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum IqType { /// This is a request for accessing some data. Get(Element), @@ -53,7 +53,7 @@ impl<'a> IntoAttributeValue for &'a IqType { } /// The main structure representing the `` stanza. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct Iq { /// The JID emitting this stanza. pub from: Option, diff --git a/parsers/src/stanza_error.rs b/parsers/src/stanza_error.rs index ccf3db77..b4d81ea6 100644 --- a/parsers/src/stanza_error.rs +++ b/parsers/src/stanza_error.rs @@ -194,7 +194,7 @@ generate_element_enum!( type Lang = String; /// The representation of a stanza error. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub struct StanzaError { /// The type of this error. pub type_: ErrorType,