]> git.lizzy.rs Git - rust.git/commitdiff
Remove useless `if_let_chain`
authormcarton <cartonmartin+git@gmail.com>
Sun, 5 Jun 2016 18:46:27 +0000 (20:46 +0200)
committermcarton <cartonmartin+git@gmail.com>
Sun, 5 Jun 2016 18:46:27 +0000 (20:46 +0200)
clippy_lints/src/derive.rs

index f08522953aa641599dd697e74dfb0d9716e7fae2..b941d9a7fca42c9ca8f244875001ca532934ff61 100644 (file)
@@ -70,9 +70,7 @@ fn get_lints(&self) -> LintArray {
 
 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 @@ fn check_item(&mut self, cx: &LateContext, item: &Item) {
             if !is_automatically_derived {
                 check_copy_clone(cx, item, trait_ref, ty);
             }
-        }}
+        }
     }
 }