From e80d883bf13a0e3740d741af69b6470872c376e8 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 10 Jul 2017 10:21:21 +0200 Subject: [PATCH] Run rustfmt --- clippy_lints/src/loops.rs | 8 +++++--- clippy_lints/src/utils/hir_utils.rs | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index c71a36ab9a7..14088c15689 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -306,7 +306,7 @@ declare_lint! { #[derive(Copy, Clone, Default)] pub struct Pass { - loop_count : usize, + loop_count: usize, } impl LintPass for Pass { @@ -331,8 +331,10 @@ impl LintPass for Pass { 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; + }, + _ => (), } } diff --git a/clippy_lints/src/utils/hir_utils.rs b/clippy_lints/src/utils/hir_utils.rs index bd7edf2f564..3b943b83bb0 100644 --- a/clippy_lints/src/utils/hir_utils.rs +++ b/clippy_lints/src/utils/hir_utils.rs @@ -110,8 +110,7 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> { 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)) => {