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
|
|
@ -37,11 +37,11 @@ impl TryFrom<Element> for Replace {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Element> for Replace {
|
||||
fn into(self) -> Element {
|
||||
impl From<Replace> for Element {
|
||||
fn from(replace: Replace) -> Element {
|
||||
Element::builder("replace")
|
||||
.ns(ns::MESSAGE_CORRECT)
|
||||
.attr("id", self.id)
|
||||
.attr("id", replace.id)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue