mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
a lot of clippy::style fixes
This commit is contained in:
parent
ae7e55c1dd
commit
202b51bc7b
19 changed files with 52 additions and 69 deletions
|
@ -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::<Vec<_>>();
|
||||
let e = e.into_iter().map(make_nnf).collect::<Vec<_>>();
|
||||
|
||||
CfgExpr::Any(distribute_conj(&e))
|
||||
}
|
||||
|
@ -300,8 +300,8 @@ fn distribute_conj(conj: &[CfgExpr]) -> Vec<CfgExpr> {
|
|||
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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue