1
Fork 0

Run rustfmt

This commit is contained in:
Oliver Schneider 2017-07-10 10:21:21 +02:00
parent 20d83289ae
commit e80d883bf1
2 changed files with 6 additions and 5 deletions

View file

@ -306,7 +306,7 @@ declare_lint! {
#[derive(Copy, Clone, Default)] #[derive(Copy, Clone, Default)]
pub struct Pass { pub struct Pass {
loop_count : usize, loop_count: usize,
} }
impl LintPass for Pass { impl LintPass for Pass {
@ -331,8 +331,10 @@ impl LintPass for Pass {
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx Expr) { fn check_expr_post(&mut self, _: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
match expr.node { match expr.node {
ExprWhile(..) | ExprLoop(..) => { self.loop_count -= 1; } ExprWhile(..) | ExprLoop(..) => {
_ => () self.loop_count -= 1;
},
_ => (),
} }
} }

View file

@ -110,8 +110,7 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r)) over(&l.pats, &r.pats, |l, r| self.eq_pat(l, r))
}) })
}, },
(&ExprMethodCall(ref l_path, _, ref l_args), (&ExprMethodCall(ref l_path, _, ref l_args), &ExprMethodCall(ref r_path, _, ref r_args)) => {
&ExprMethodCall(ref r_path, _, ref r_args)) => {
!self.ignore_fn && l_path == r_path && self.eq_exprs(l_args, 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)) => { (&ExprRepeat(ref le, ll_id), &ExprRepeat(ref re, rl_id)) => {