about summary refs log tree commit diff
path: root/src/librustc_builtin_macros/deriving
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-21 13:14:44 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-21 15:54:14 +0100
commit1dcbdbdf4ff808906d68c59e1e4be30c2a658797 (patch)
treef2cc69730091b30d12b9ee825f6021ca01184657 /src/librustc_builtin_macros/deriving
parent54e103b2f9d0141ce751df3e99b3a7bc4337181b (diff)
downloadrust-1dcbdbdf4ff808906d68c59e1e4be30c2a658797.tar.gz
rust-1dcbdbdf4ff808906d68c59e1e4be30c2a658797.zip
use let instead of match for matches with single bindings (clippy::match_single_binding)
Diffstat (limited to 'src/librustc_builtin_macros/deriving')
-rw-r--r--src/librustc_builtin_macros/deriving/generic/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_builtin_macros/deriving/generic/mod.rs b/src/librustc_builtin_macros/deriving/generic/mod.rs
index ee32e914acb..9338f9afbbb 100644
--- a/src/librustc_builtin_macros/deriving/generic/mod.rs
+++ b/src/librustc_builtin_macros/deriving/generic/mod.rs
@@ -1056,8 +1056,9 @@ impl<'a> MethodDef<'a> {
                     self_: field,
                     other: other_fields
                         .iter_mut()
-                        .map(|l| match l.next().unwrap() {
-                            (.., ex, _) => ex,
+                        .map(|l| {
+                            let (.., ex, _) = l.next().unwrap();
+                            ex
                         })
                         .collect(),
                     attrs,