From 635fdc662a376ba98a25e15056b27319ac97628d Mon Sep 17 00:00:00 2001 From: topecongiro <seuchida@gmail.com> Date: Thu, 25 May 2017 09:34:10 +0900 Subject: [PATCH] Format source codes --- src/chains.rs | 8 +++----- src/patterns.rs | 8 ++++---- tests/target/closure.rs | 6 +++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/chains.rs b/src/chains.rs index cacc0624882..e69731c5dc4 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -99,11 +99,9 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) - } let trailing_try_num = subexpr_list .iter() - .take_while(|e| { - match e.node { - ast::ExprKind::Try(..) => true, - _ => false, - } + .take_while(|e| match e.node { + ast::ExprKind::Try(..) => true, + _ => false, }) .count(); diff --git a/src/patterns.rs b/src/patterns.rs index afea0ddb299..312f2b0ace9 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -39,10 +39,10 @@ impl Rewrite for Pat { let sub_pat = match *sub_pat { Some(ref p) => { // 3 - ` @ `. - let width = try_opt!(shape.width.checked_sub(prefix.len() + - mut_infix.len() + - id_str.len() + - 3)); + let width = + try_opt!(shape.width.checked_sub(prefix.len() + mut_infix.len() + + id_str.len() + + 3)); format!(" @ {}", try_opt!(p.rewrite(context, Shape::legacy(width, shape.indent)))) } diff --git a/tests/target/closure.rs b/tests/target/closure.rs index febbb0a46a2..143f59b5962 100644 --- a/tests/target/closure.rs +++ b/tests/target/closure.rs @@ -144,9 +144,9 @@ fn issue470() { impl Foo { pub fn bar(&self) { Some(SomeType { - push_closure_out_to_100_chars: iter(otherwise_it_works_ok.into_iter().map(|f| { - Ok(f) - })), + push_closure_out_to_100_chars: iter(otherwise_it_works_ok + .into_iter() + .map(|f| Ok(f))), }) } }