test(anatomy): clippy collapse in the sanitiser oracle test
This commit is contained in:
1 parent
85c2183791
commit
ab41084a36
1 file changed
+3
-3
@@ -77,11 +77,11 @@ fn tree_value(element: &Element) -> Value {
|
|||||||
|
|
||||||
/// Removes the named attribute from every element of that local name (a declared removal).
|
/// Removes the named attribute from every element of that local name (a declared removal).
|
||||||
fn strip(tree: &mut Value, element: &str, attribute: &str) {
|
fn strip(tree: &mut Value, element: &str, attribute: &str) {
|
||||||
if tree["name"] == element {
|
if tree["name"] == element
|
||||||
if let Some(attrs) = tree["attrs"].as_object_mut() {
|
&& let Some(attrs) = tree["attrs"].as_object_mut()
|
||||||
|
{
|
||||||
attrs.remove(attribute);
|
attrs.remove(attribute);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if let Some(children) = tree["children"].as_array_mut() {
|
if let Some(children) = tree["children"].as_array_mut() {
|
||||||
children
|
children
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
|
|||||||
Reference in new issue
Block a user