iq, message: Remove useless clone on unknown element.

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-24 21:32:04 +01:00
parent fbeeae5c64
commit 21b92621f0
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ impl TryFrom<Element> for IqPayload {
("fin", ns::MAM) => IqPayload::MamFin(MamFin::try_from(elem)?),
("prefs", ns::MAM) => IqPayload::MamPrefs(MamPrefs::try_from(elem)?),
_ => IqPayload::Unknown(elem.clone()),
_ => IqPayload::Unknown(elem),
})
}
}

View file

@ -79,7 +79,7 @@ impl TryFrom<Element> for MessagePayload {
// XEP-0380
("encryption", ns::EME) => MessagePayload::ExplicitMessageEncryption(ExplicitMessageEncryption::try_from(elem)?),
_ => MessagePayload::Unknown(elem.clone()),
_ => MessagePayload::Unknown(elem),
})
}
}