From 202b51bc7b6999900e06ec2cfb8d72fe9aa4af29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 21 Mar 2021 15:33:18 +0100 Subject: a lot of clippy::style fixes --- crates/cfg/src/dnf.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/cfg/src') diff --git a/crates/cfg/src/dnf.rs b/crates/cfg/src/dnf.rs index 30f4bcdf7..75ded9aa1 100644 --- a/crates/cfg/src/dnf.rs +++ b/crates/cfg/src/dnf.rs @@ -255,9 +255,9 @@ impl Builder { fn make_dnf(expr: CfgExpr) -> CfgExpr { match expr { CfgExpr::Invalid | CfgExpr::Atom(_) | CfgExpr::Not(_) => expr, - CfgExpr::Any(e) => CfgExpr::Any(e.into_iter().map(|expr| make_dnf(expr)).collect()), + CfgExpr::Any(e) => CfgExpr::Any(e.into_iter().map(make_dnf).collect()), CfgExpr::All(e) => { - let e = e.into_iter().map(|expr| make_nnf(expr)).collect::>(); + let e = e.into_iter().map(make_nnf).collect::>(); CfgExpr::Any(distribute_conj(&e)) } @@ -300,8 +300,8 @@ fn distribute_conj(conj: &[CfgExpr]) -> Vec { fn make_nnf(expr: CfgExpr) -> CfgExpr { match expr { CfgExpr::Invalid | CfgExpr::Atom(_) => expr, - CfgExpr::Any(expr) => CfgExpr::Any(expr.into_iter().map(|expr| make_nnf(expr)).collect()), - CfgExpr::All(expr) => CfgExpr::All(expr.into_iter().map(|expr| make_nnf(expr)).collect()), + CfgExpr::Any(expr) => CfgExpr::Any(expr.into_iter().map(make_nnf).collect()), + CfgExpr::All(expr) => CfgExpr::All(expr.into_iter().map(make_nnf).collect()), CfgExpr::Not(operand) => match *operand { CfgExpr::Invalid | CfgExpr::Atom(_) => CfgExpr::Not(operand.clone()), // Original negated expr CfgExpr::Not(expr) => { -- cgit v1.2.3