parsers: derive PartialEq on Iq too

Maxime “pep” Buquet created

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>

Change summary

parsers/src/iq.rs           | 4 ++--
parsers/src/stanza_error.rs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

Detailed changes

parsers/src/iq.rs 🔗

@@ -23,7 +23,7 @@ pub trait IqSetPayload: TryFrom<Element> + Into<Element> {}
 pub trait IqResultPayload: TryFrom<Element> + Into<Element> {}
 
 /// 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 `<iq/>` stanza.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, PartialEq)]
 pub struct Iq {
     /// The JID emitting this stanza.
     pub from: Option<Jid>,

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,