chore: make clippy happy and limit workspace checks

This commit is contained in:
Jonathan Kelley 2022-12-29 00:46:02 -05:00
parent d3c3c41d9e
commit bc707db832
2 changed files with 5 additions and 6 deletions

View file

@ -2,5 +2,6 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"[toml]": { "[toml]": {
"editor.formatOnSave": false "editor.formatOnSave": false
} },
"rust-analyzer.checkOnSave.allTargets": false,
} }

View file

@ -8,8 +8,7 @@ pub fn convert_from_html(dom: Dom) -> CallBody {
roots: dom roots: dom
.children .children
.into_iter() .into_iter()
.map(|f| create_body_node_from_node(f)) .filter_map(create_body_node_from_node)
.filter_map(|f| f)
.collect(), .collect(),
} }
} }
@ -37,7 +36,7 @@ fn create_body_node_from_node(node: Node) -> Option<BodyNode> {
ElementAttrNamed { ElementAttrNamed {
attr: ElementAttr::AttrText { attr: ElementAttr::AttrText {
name: ident, name: ident,
value: ifmt_from_text(value.unwrap_or("false".to_string())), value: ifmt_from_text(value.unwrap_or_else(|| "false".to_string())),
}, },
el_name: el_name.clone(), el_name: el_name.clone(),
} }
@ -68,8 +67,7 @@ fn create_body_node_from_node(node: Node) -> Option<BodyNode> {
let children = el let children = el
.children .children
.into_iter() .into_iter()
.map(|f| create_body_node_from_node(f)) .filter_map(create_body_node_from_node)
.filter_map(|f| f)
.collect(); .collect();
Some(BodyNode::Element(Element { Some(BodyNode::Element(Element {