Skip to content

Commit 0d542b7

Browse files
committed
Run tests/ui/update-all-references.sh and refactor match into matches!
1 parent 415394c commit 0d542b7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

clippy_lints/src/write.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,7 @@ impl Write {
470470
ExprKind::Assign(lhs, rhs, _) => {
471471
if_chain! {
472472
if let ExprKind::Lit(ref lit) = rhs.kind;
473-
if match lit.kind {
474-
LitKind::Int(_, _) | LitKind::Float(_, _) => false,
475-
_ => true,
476-
};
473+
if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..));
477474
if let ExprKind::Path(_, p) = &lhs.kind;
478475
then {
479476
let mut all_simple = true;

0 commit comments

Comments
 (0)