xmlstream: use Stanza for XmppStreamElement

Oftentimes, Stanza is at hand anyway, so this saves some typing.
This commit is contained in:
Jonas Schäfer 2024-09-02 17:27:31 +02:00
commit 56ce57ecde
5 changed files with 23 additions and 60 deletions

View file

@ -102,11 +102,7 @@ impl TryFrom<Stanza> for Iq {
impl From<Stanza> for XmppStreamElement {
fn from(other: Stanza) -> Self {
match other {
Stanza::Iq(st) => Self::Iq(st),
Stanza::Message(st) => Self::Message(st),
Stanza::Presence(st) => Self::Presence(st),
}
Self::Stanza(other)
}
}