about summary refs log tree commit diff
path: root/src/chains.rs
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2017-05-26 16:36:15 +0900
committertopecongiro <seuchida@gmail.com>2017-05-26 16:40:19 +0900
commit554605d47cc2546f32871de5f41ef4008f5d5ecf (patch)
tree2c9b462162f25b523cb6cca1e2b22900ea27949f /src/chains.rs
parent15b988aed3d2d4ec761452840ed96b84080c2abc (diff)
Format source codes and add tests
Diffstat (limited to 'src/chains.rs')
-rw-r--r--src/chains.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/chains.rs b/src/chains.rs
index 9a8a6914440..1c66306022d 100644
--- a/src/chains.rs
+++ b/src/chains.rs
@@ -168,10 +168,9 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) -
             .into_iter()
             .chain(::std::iter::repeat(other_child_shape).take(subexpr_list.len() - 1));
     let iter = subexpr_list.iter().rev().zip(child_shape_iter);
-    let mut rewrites = try_opt!(iter.map(|(e, shape)| {
-                                             rewrite_chain_subexpr(e, total_span, context, shape)
-                                         })
-                                    .collect::<Option<Vec<_>>>());
+    let mut rewrites =
+        try_opt!(iter.map(|(e, shape)| rewrite_chain_subexpr(e, total_span, context, shape))
+                     .collect::<Option<Vec<_>>>());
 
     // Total of all items excluding the last.
     let last_non_try_index = rewrites.len() - (1 + trailing_try_num);