mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Remove useless if_let_chain
This commit is contained in:
parent
9f70d04000
commit
7211df5a17
1 changed files with 2 additions and 4 deletions
|
@ -70,9 +70,7 @@ impl LintPass for Derive {
|
|||
|
||||
impl LateLintPass for Derive {
|
||||
fn check_item(&mut self, cx: &LateContext, item: &Item) {
|
||||
if_let_chain! {[
|
||||
let ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node
|
||||
], {
|
||||
if let ItemImpl(_, _, _, Some(ref trait_ref), _, _) = item.node {
|
||||
let ty = cx.tcx.lookup_item_type(cx.tcx.map.local_def_id(item.id)).ty;
|
||||
let is_automatically_derived = item.attrs.iter().any(is_automatically_derived);
|
||||
|
||||
|
@ -81,7 +79,7 @@ impl LateLintPass for Derive {
|
|||
if !is_automatically_derived {
|
||||
check_copy_clone(cx, item, trait_ref, ty);
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue