Merge branch 'master' into 'master'
Fix clippy lints See merge request lumi/minidom-rs!32
This commit is contained in:
commit
823810e2e0
4 changed files with 7 additions and 9 deletions
|
@ -44,7 +44,7 @@ impl<'a> IntoAttributeValue for &'a str {
|
||||||
|
|
||||||
impl<T: IntoAttributeValue> IntoAttributeValue for Option<T> {
|
impl<T: IntoAttributeValue> IntoAttributeValue for Option<T> {
|
||||||
fn into_attribute_value(self) -> Option<String> {
|
fn into_attribute_value(self) -> Option<String> {
|
||||||
self.and_then(|t| t.into_attribute_value())
|
self.and_then(IntoAttributeValue::into_attribute_value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,8 @@ impl Element {
|
||||||
Element {
|
Element {
|
||||||
prefix, name,
|
prefix, name,
|
||||||
namespaces: Rc::new(namespaces.into()),
|
namespaces: Rc::new(namespaces.into()),
|
||||||
attributes: attributes,
|
attributes,
|
||||||
children: children,
|
children,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ impl From<BTreeMap<Option<String>, String>> for NamespaceSet {
|
||||||
fn from(namespaces: BTreeMap<Option<String>, String>) -> Self {
|
fn from(namespaces: BTreeMap<Option<String>, String>) -> Self {
|
||||||
NamespaceSet {
|
NamespaceSet {
|
||||||
parent: RefCell::new(None),
|
parent: RefCell::new(None),
|
||||||
namespaces: namespaces,
|
namespaces,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ impl From<String> for NamespaceSet {
|
||||||
|
|
||||||
NamespaceSet {
|
NamespaceSet {
|
||||||
parent: RefCell::new(None),
|
parent: RefCell::new(None),
|
||||||
namespaces: namespaces,
|
namespaces,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ impl From<(Option<String>, String)> for NamespaceSet {
|
||||||
|
|
||||||
NamespaceSet {
|
NamespaceSet {
|
||||||
parent: RefCell::new(None),
|
parent: RefCell::new(None),
|
||||||
namespaces: namespaces,
|
namespaces,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,13 +165,11 @@ impl Node {
|
||||||
Node::Element(ref elmt) => elmt.write_to_inner(writer)?,
|
Node::Element(ref elmt) => elmt.write_to_inner(writer)?,
|
||||||
Node::Text(ref s) => {
|
Node::Text(ref s) => {
|
||||||
writer.write_event(Event::Text(BytesText::from_plain_str(s)))?;
|
writer.write_event(Event::Text(BytesText::from_plain_str(s)))?;
|
||||||
()
|
|
||||||
},
|
},
|
||||||
Node::Comment(ref s) => {
|
Node::Comment(ref s) => {
|
||||||
writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?;
|
writer.write_event(Event::Comment(BytesText::from_plain_str(s)))?;
|
||||||
()
|
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue