From 21b92621f0f7bbf611ab4618f5723399fcad924f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 24 May 2017 21:32:04 +0100 Subject: [PATCH] iq, message: Remove useless clone on unknown element. --- src/iq.rs | 2 +- src/message.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), }) } }