Simlify with matches!()

This commit is contained in:
Veetaha
2020-06-28 04:02:03 +03:00
parent 513924a7e0
commit e75e2ae5b6
20 changed files with 32 additions and 98 deletions

View File

@@ -399,10 +399,7 @@ impl ast::BlockExpr {
Some(it) => it,
None => return true,
};
match parent.kind() {
FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR => false,
_ => true,
}
!matches!(parent.kind(), FN_DEF | IF_EXPR | WHILE_EXPR | LOOP_EXPR | EFFECT_EXPR)
}
}