iq: Clippify
This commit is contained in:
parent
c462d230f1
commit
1b4c0c4589
1 changed files with 7 additions and 7 deletions
14
src/iq.rs
14
src/iq.rs
|
@ -144,14 +144,14 @@ pub fn serialise(iq: &Iq) -> Element {
|
||||||
.attr("type", iq.payload.clone())
|
.attr("type", iq.payload.clone())
|
||||||
.build();
|
.build();
|
||||||
let elem = match iq.payload.clone() {
|
let elem = match iq.payload.clone() {
|
||||||
IqType::Get(IqPayloadType::XML(elem)) => elem,
|
IqType::Get(IqPayloadType::XML(elem))
|
||||||
IqType::Get(IqPayloadType::Parsed(payload)) => serialise_payload(&payload),
|
| IqType::Set(IqPayloadType::XML(elem))
|
||||||
IqType::Set(IqPayloadType::XML(elem)) => elem,
|
| IqType::Result(Some(IqPayloadType::XML(elem)))
|
||||||
IqType::Set(IqPayloadType::Parsed(payload)) => serialise_payload(&payload),
|
| 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(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!(),
|
_ => panic!(),
|
||||||
};
|
};
|
||||||
stanza.append_child(elem);
|
stanza.append_child(elem);
|
||||||
|
|
Loading…
Reference in a new issue