Use if let over match.

This commit is contained in:
Jay Hardee 2017-07-22 19:54:44 -04:00
parent 83a6dbc828
commit f17def5801

View File

@ -73,9 +73,8 @@ impl EarlyLintPass for LiteralDigitGrouping {
return;
}
match expr.node {
ExprKind::Lit(ref lit) => self.check_lit(cx, lit),
_ => (),
if let ExprKind::Lit(ref lit) = expr.node {
self.check_lit(cx, lit)
}
}
}