diff --git a/src/convert.rs b/src/convert.rs index 534073298b3d94fb206c68800a4e750d1558f28b..7c6d314e56df62c13a3c6c9e62c6491859a14c54 100644 --- a/src/convert.rs +++ b/src/convert.rs @@ -44,7 +44,7 @@ impl<'a> IntoAttributeValue for &'a str { impl IntoAttributeValue for Option { fn into_attribute_value(self) -> Option { - self.and_then(|t| t.into_attribute_value()) + self.and_then(IntoAttributeValue::into_attribute_value) } } diff --git a/src/element.rs b/src/element.rs index 5db7727bec18581a013e339defad144279ed1c6e..a94c1cec998b0586d88a95e262adaba2637729dd 100644 --- a/src/element.rs +++ b/src/element.rs @@ -102,8 +102,8 @@ impl Element { Element { prefix, name, namespaces: Rc::new(namespaces.into()), - attributes: attributes, - children: children, + attributes, + children, } } diff --git a/src/namespace_set.rs b/src/namespace_set.rs index 767106280929bbccea5d4dbd4ce7c8b1e966b142..57d3156dc5883f75ce06faa70aa683892604e5b4 100644 --- a/src/namespace_set.rs +++ b/src/namespace_set.rs @@ -58,7 +58,7 @@ impl From, String>> for NamespaceSet { fn from(namespaces: BTreeMap, String>) -> Self { NamespaceSet { parent: RefCell::new(None), - namespaces: namespaces, + namespaces, } } } @@ -79,7 +79,7 @@ impl From for NamespaceSet { NamespaceSet { parent: RefCell::new(None), - namespaces: namespaces, + namespaces, } } } @@ -92,7 +92,7 @@ impl From<(Option, String)> for NamespaceSet { NamespaceSet { parent: RefCell::new(None), - namespaces: namespaces, + namespaces, } } } diff --git a/src/node.rs b/src/node.rs index 7fe5ddadc70ca316d807c87dc4c1936c4dd6a833..b136dbdce5bc44c002f8c6588415838aa006a8a3 100644 --- a/src/node.rs +++ b/src/node.rs @@ -165,13 +165,11 @@ impl Node { Node::Element(ref elmt) => elmt.write_to_inner(writer)?, Node::Text(ref s) => { writer.write_event(Event::Text(BytesText::from_plain_str(s)))?; - () }, Node::Comment(ref s) => { writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?; - () }, - }; + } Ok(()) }