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
|
|
@ -35,12 +35,12 @@ impl TryFrom<Element> for ExplicitMessageEncryption {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<Element> for ExplicitMessageEncryption {
|
||||
fn into(self) -> Element {
|
||||
impl From<ExplicitMessageEncryption> for Element {
|
||||
fn from(eme: ExplicitMessageEncryption) -> Element {
|
||||
Element::builder("encryption")
|
||||
.ns(ns::EME)
|
||||
.attr("namespace", self.namespace)
|
||||
.attr("name", self.name)
|
||||
.attr("namespace", eme.namespace)
|
||||
.attr("name", eme.name)
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue