]> git.lizzy.rs Git - rust.git/commitdiff
Fix formatting in unused label linting to make tidy checks pass
authorKyle Stachowicz <kylestach99@gmail.com>
Wed, 16 May 2018 03:58:09 +0000 (20:58 -0700)
committerKyle Stachowicz <kylestach99@gmail.com>
Fri, 18 May 2018 23:57:15 +0000 (16:57 -0700)
src/librustc_lint/unused.rs

index f55a37697bc3fa04ca040afabce98e9e240adaaf..2321d40f150e1e045eaddef7f48f016448af97cd 100644 (file)
@@ -496,7 +496,9 @@ fn check_expr(&mut self, _: &EarlyContext, expr: &ast::Expr) {
                 self.0.push((label, false));
             }
             ast::ExprKind::Break(Some(label), _) | ast::ExprKind::Continue(Some(label)) => {
-                if let Some((_, ref mut was_used)) = self.0.iter_mut().rev().find(|(l, _)| label == *l) {
+                if let Some((_, ref mut was_used)) =
+                    self.0.iter_mut().rev().find(|(l, _)| label == *l)
+                {
                     *was_used = true;
                 }
             }
@@ -515,7 +517,7 @@ fn check_expr_post(&mut self, ctxt: &EarlyContext, expr: &ast::Expr) {
                         ctxt.span_lint(UNUSED_LABEL, label.ident.span, "unused label");
                     }
                 }
-            },
+            }
             _ => {}
         }
     }