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:
Emmanuel Gil Peyrot 2017-07-20 20:36:13 +01:00
commit 487dbdc6de
28 changed files with 266 additions and 265 deletions

View file

@ -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()
}
}