Replace Into<Element> with From<…> for Element.
This allows Element::from() to work, and since Into<Element> is automatically implemented for any type implementing From there is no change to existing code.
This commit is contained in:
parent
5ec921fa6f
commit
487dbdc6de
28 changed files with 266 additions and 265 deletions
|
|
@ -45,9 +45,9 @@ impl TryFrom<Element> for StanzaId {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Element> for StanzaId {
|
||||
fn into(self) -> Element {
|
||||
match self {
|
||||
impl From<StanzaId> for Element {
|
||||
fn from(stanza_id: StanzaId) -> Element {
|
||||
match stanza_id {
|
||||
StanzaId::StanzaId { id, by } => {
|
||||
Element::builder("stanza-id")
|
||||
.ns(ns::SID)
|
||||
|
|
|
|||
Loading…
Reference in a new issue