From c0b7c9da884555e4b1863e6f7f6a37a7f658d1d8 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 1 May 2017 01:50:38 +0100 Subject: [PATCH] iq: Remove unused variable causing a warning. --- src/iq.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/iq.rs b/src/iq.rs index cf970553..c7728ae2 100644 --- a/src/iq.rs +++ b/src/iq.rs @@ -268,19 +268,16 @@ mod tests { ".parse().unwrap(); let iq = iq::parse_iq(&elem).unwrap(); - let error: Element = " - - ".parse().unwrap(); assert_eq!(iq.from, None); assert_eq!(iq.to, None); assert_eq!(iq.id, None); match iq.payload { - iq::IqType::Error(element) => { - assert_eq!(element.type_, stanza_error::ErrorType::Cancel); - assert_eq!(element.by, None); - assert_eq!(element.defined_condition, stanza_error::DefinedCondition::ServiceUnavailable); - assert_eq!(element.texts.len(), 0); - assert_eq!(element.other, None); + iq::IqType::Error(error) => { + assert_eq!(error.type_, stanza_error::ErrorType::Cancel); + assert_eq!(error.by, None); + assert_eq!(error.defined_condition, stanza_error::DefinedCondition::ServiceUnavailable); + assert_eq!(error.texts.len(), 0); + assert_eq!(error.other, None); }, _ => panic!(), }