iq, message: Remove useless clone on unknown element.
This commit is contained in:
parent
fbeeae5c64
commit
21b92621f0
2 changed files with 2 additions and 2 deletions
|
@ -61,7 +61,7 @@ impl TryFrom<Element> for IqPayload {
|
||||||
("fin", ns::MAM) => IqPayload::MamFin(MamFin::try_from(elem)?),
|
("fin", ns::MAM) => IqPayload::MamFin(MamFin::try_from(elem)?),
|
||||||
("prefs", ns::MAM) => IqPayload::MamPrefs(MamPrefs::try_from(elem)?),
|
("prefs", ns::MAM) => IqPayload::MamPrefs(MamPrefs::try_from(elem)?),
|
||||||
|
|
||||||
_ => IqPayload::Unknown(elem.clone()),
|
_ => IqPayload::Unknown(elem),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ impl TryFrom<Element> for MessagePayload {
|
||||||
// XEP-0380
|
// XEP-0380
|
||||||
("encryption", ns::EME) => MessagePayload::ExplicitMessageEncryption(ExplicitMessageEncryption::try_from(elem)?),
|
("encryption", ns::EME) => MessagePayload::ExplicitMessageEncryption(ExplicitMessageEncryption::try_from(elem)?),
|
||||||
|
|
||||||
_ => MessagePayload::Unknown(elem.clone()),
|
_ => MessagePayload::Unknown(elem),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue