diff --git a/src/iq.rs b/src/iq.rs index aaf7b027..28b49efb 100644 --- a/src/iq.rs +++ b/src/iq.rs @@ -61,7 +61,7 @@ impl TryFrom 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), }) } } diff --git a/src/message.rs b/src/message.rs index be47756a..bc8a0035 100644 --- a/src/message.rs +++ b/src/message.rs @@ -79,7 +79,7 @@ impl TryFrom for MessagePayload { // XEP-0380 ("encryption", ns::EME) => MessagePayload::ExplicitMessageEncryption(ExplicitMessageEncryption::try_from(elem)?), - _ => MessagePayload::Unknown(elem.clone()), + _ => MessagePayload::Unknown(elem), }) } }