diff options
| author | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-09 20:44:22 +0200 | 
|---|---|---|
| committer | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-10 15:38:19 +0200 | 
| commit | 71dd0b928b8b175b69e56fc58e5878b73f090718 (patch) | |
| tree | aeffddc5806cdc0d8b3d866d13c6235385b876a5 /compiler/rustc_macros/src/hash_stable.rs | |
| parent | 15491d7b6be1065217e09bd735e4ecffbe9838ba (diff) | |
| download | rust-71dd0b928b8b175b69e56fc58e5878b73f090718.tar.gz rust-71dd0b928b8b175b69e56fc58e5878b73f090718.zip | |
Apply clippy suggestions
Diffstat (limited to 'compiler/rustc_macros/src/hash_stable.rs')
| -rw-r--r-- | compiler/rustc_macros/src/hash_stable.rs | 8 | 
1 files changed, 3 insertions, 5 deletions
| diff --git a/compiler/rustc_macros/src/hash_stable.rs b/compiler/rustc_macros/src/hash_stable.rs index dba885a27fe..63bdcea87f8 100644 --- a/compiler/rustc_macros/src/hash_stable.rs +++ b/compiler/rustc_macros/src/hash_stable.rs @@ -24,11 +24,9 @@ fn parse_attributes(field: &syn::Field) -> Attributes { } if meta.path().is_ident("project") { if let Meta::List(list) = meta { - if let Some(nested) = list.nested.iter().next() { - if let NestedMeta::Meta(meta) = nested { - attrs.project = meta.path().get_ident().cloned(); - any_attr = true; - } + if let Some(NestedMeta::Meta(meta)) = list.nested.iter().next() { + attrs.project = meta.path().get_ident().cloned(); + any_attr = true; } } } | 
