diff --git a/minidom/src/element.rs b/minidom/src/element.rs index 0bb6c0b7..9d690631 100644 --- a/minidom/src/element.rs +++ b/minidom/src/element.rs @@ -413,7 +413,7 @@ impl Element { }, None => RxmlNamespace::NONE, }; - writer.write(Item::Attribute(&namespace, name, (&**value).into()))?; + writer.write(Item::Attribute(&namespace, name, value))?; } if !self.children.is_empty() { diff --git a/minidom/src/node.rs b/minidom/src/node.rs index 5ef5dc24..2e1e9a54 100644 --- a/minidom/src/node.rs +++ b/minidom/src/node.rs @@ -159,10 +159,10 @@ impl Node { #[doc(hidden)] pub(crate) fn write_to_inner(&self, writer: &mut ItemWriter) -> Result<()> { - match *self { - Node::Element(ref elmt) => elmt.write_to_inner(writer)?, - Node::Text(ref s) => { - writer.write(Item::Text((&**s).into()))?; + match self { + Node::Element(elmt) => elmt.write_to_inner(writer)?, + Node::Text(s) => { + writer.write(Item::Text(s))?; } }