]> git.lizzy.rs Git - rust.git/commitdiff
Run rustfmt
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Mon, 10 Jul 2017 08:21:21 +0000 (10:21 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Mon, 10 Jul 2017 08:21:21 +0000 (10:21 +0200)
clippy_lints/src/loops.rs
clippy_lints/src/utils/hir_utils.rs

index c71a36ab9a7c596be6659672e03fd7b5f943f5df..14088c15689959ce616baf260b5edca01f4c4bd2 100644 (file)
 
 #[derive(Copy, Clone, Default)]
 pub struct Pass {
-    loop_count : usize,
+    loop_count: usize,
 }
 
 impl LintPass for Pass {
@@ -331,8 +331,10 @@ fn get_lints(&self) -> LintArray {
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
     fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
         match expr.node {
-            ExprWhile(..) | ExprLoop(..) => { self.loop_count -= 1; }
-            _ => ()
+            ExprWhile(..) | ExprLoop(..) => {
+                self.loop_count -= 1;
+            },
+            _ => (),
         }
     }
 
index bd7edf2f56453d5eb92117d17e58253a4d0f9887..3b943b83bb096e455856b4f536aa5e2069b98d0d 100644 (file)
@@ -110,8 +110,7 @@ pub fn eq_expr(&self, left: &Expr, right: &Expr) -> bool {
                     over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r))
                 })
             },
-            (&ExprMethodCall(ref l_path, _, ref l_args),
-             &ExprMethodCall(ref r_path, _, ref r_args)) => {
+            (&ExprMethodCall(ref l_path, _, ref l_args), &ExprMethodCall(ref r_path, _, ref r_args)) => {
                 !self.ignore_fn && l_path == r_path && self.eq_exprs(l_args, r_args)
             },
             (&ExprRepeat(ref le, ll_id), &ExprRepeat(ref re, rl_id)) => {