diff options
| author | pro-grammer1 <1df0d0d3-eed4-45fc-bc60-43a85079f3f9@anonaddy.me> | 2021-01-17 08:48:37 +0000 |
|---|---|---|
| committer | pro-grammer1 <1df0d0d3-eed4-45fc-bc60-43a85079f3f9@anonaddy.me> | 2021-01-17 08:48:37 +0000 |
| commit | 0d542b7310294a32023e935916a4d8c8f47ec1a8 (patch) | |
| tree | 819fc22f23aed97bde3302072024bf3933a212a4 | |
| parent | 415394c3fc0e008026b3f2a37fbd57a58449b4d3 (diff) | |
| download | rust-0d542b7310294a32023e935916a4d8c8f47ec1a8.tar.gz rust-0d542b7310294a32023e935916a4d8c8f47ec1a8.zip | |
Run tests/ui/update-all-references.sh and refactor match into matches!
| -rw-r--r-- | clippy_lints/src/write.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index 78d23e1e0ef..52118a56bb6 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -470,10 +470,7 @@ impl Write { ExprKind::Assign(lhs, rhs, _) => { if_chain! { if let ExprKind::Lit(ref lit) = rhs.kind; - if match lit.kind { - LitKind::Int(_, _) | LitKind::Float(_, _) => false, - _ => true, - }; + if matches!(lit.kind, LitKind::Int(..) | LitKind::Float(..)); if let ExprKind::Path(_, p) = &lhs.kind; then { let mut all_simple = true; |
