Selaa lähdekoodia

Touch up some clippy warnings

Ian Goldberg 1 viikko sitten
vanhempi
commit
b1a5ec5461

+ 2 - 4
sigma-compiler-core/src/sigma/combiners.rs

@@ -404,10 +404,8 @@ impl StatementTree {
         // and only if both is_new_branch is true, and also we're at a
         // and only if both is_new_branch is true, and also we're at a
         // non-disjunction node
         // non-disjunction node
         match self {
         match self {
-            StatementTree::Leaf(_) | StatementTree::And(_) => {
-                if is_new_branch {
-                    (closure)(self, path)?;
-                }
+            StatementTree::Leaf(_) | StatementTree::And(_) if is_new_branch => {
+                (closure)(self, path)?;
             }
             }
             _ => {}
             _ => {}
         }
         }

+ 1 - 1
sigma-compiler-core/src/substitution.rs

@@ -195,7 +195,7 @@ pub fn transform(
             if spriv_vars.contains(&idstr) {
             if spriv_vars.contains(&idstr) {
                 do_substitution(sexpr, &idstr, &expr);
                 do_substitution(sexpr, &idstr, &expr);
                 spriv_vars.remove(&idstr);
                 spriv_vars.remove(&idstr);
-                spriv_vars.extend(priv_vars.clone().into_iter());
+                spriv_vars.extend(priv_vars.clone());
             }
             }
         }
         }
         // Do the substitution on each leaf Expr in the StatementTree
         // Do the substitution on each leaf Expr in the StatementTree