From 1adccee40b0ad2029be93a4db8bdf27a08e377cf Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 3 Jul 2024 11:18:54 +0200 Subject: [PATCH] minidom: Fix all clippy warnings --- minidom/src/element.rs | 2 +- minidom/src/node.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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))?; } }