From 1b4c0c45895bd163a123cedd82974486a582b3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 24 Apr 2017 19:20:35 +0100 Subject: [PATCH] iq: Clippify --- src/iq.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/iq.rs b/src/iq.rs index eda650ac..9d7fd79f 100644 --- a/src/iq.rs +++ b/src/iq.rs @@ -144,14 +144,14 @@ pub fn serialise(iq: &Iq) -> Element { .attr("type", iq.payload.clone()) .build(); let elem = match iq.payload.clone() { - IqType::Get(IqPayloadType::XML(elem)) => elem, - IqType::Get(IqPayloadType::Parsed(payload)) => serialise_payload(&payload), - IqType::Set(IqPayloadType::XML(elem)) => elem, - IqType::Set(IqPayloadType::Parsed(payload)) => serialise_payload(&payload), + IqType::Get(IqPayloadType::XML(elem)) + | IqType::Set(IqPayloadType::XML(elem)) + | IqType::Result(Some(IqPayloadType::XML(elem))) + | IqType::Error(IqPayloadType::XML(elem)) => elem, + IqType::Get(IqPayloadType::Parsed(payload)) + | IqType::Set(IqPayloadType::Parsed(payload)) + | IqType::Result(Some(IqPayloadType::Parsed(payload))) => serialise_payload(&payload), IqType::Result(None) => return stanza, - IqType::Result(Some(IqPayloadType::XML(elem))) => elem, - IqType::Result(Some(IqPayloadType::Parsed(payload))) => serialise_payload(&payload), - IqType::Error(IqPayloadType::XML(elem)) => elem, _ => panic!(), }; stanza.append_child(elem);