diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-21 13:14:44 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-03-21 15:54:14 +0100 |
| commit | 1dcbdbdf4ff808906d68c59e1e4be30c2a658797 (patch) | |
| tree | f2cc69730091b30d12b9ee825f6021ca01184657 /src/librustc_builtin_macros/deriving | |
| parent | 54e103b2f9d0141ce751df3e99b3a7bc4337181b (diff) | |
| download | rust-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.rs | 5 |
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, |
