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
|
|
@ -42,13 +42,13 @@ impl TryFrom<Element> for Transport {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Element> for Transport {
|
||||
fn into(self) -> Element {
|
||||
impl From<Transport> for Element {
|
||||
fn from(transport: Transport) -> Element {
|
||||
Element::builder("transport")
|
||||
.ns(ns::JINGLE_IBB)
|
||||
.attr("block-size", self.block_size)
|
||||
.attr("sid", self.sid)
|
||||
.attr("stanza", self.stanza)
|
||||
.attr("block-size", transport.block_size)
|
||||
.attr("sid", transport.sid)
|
||||
.attr("stanza", transport.stanza)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue