xmlstream: use Stanza for XmppStreamElement
Oftentimes, Stanza is at hand anyway, so this saves some typing.
This commit is contained in:
parent
c6f928d5c8
commit
56ce57ecde
5 changed files with 23 additions and 60 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue