diff options
| author | topecongiro <seuchida@gmail.com> | 2017-06-05 15:32:21 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-06-05 15:32:21 +0900 |
| commit | 7250a468f978991e87e9f8dfd19ed74af903c21f (patch) | |
| tree | 293603f3b95215ead543563f3ee48d65245ac27c /src | |
| parent | 41b7cc6a730f9c0b68a06df21a59467e6c7d0a4c (diff) | |
Format source codes
Diffstat (limited to 'src')
| -rw-r--r-- | src/chains.rs | 6 | ||||
| -rw-r--r-- | src/types.rs | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/chains.rs b/src/chains.rs index c48fdeb0b66..204f0b80423 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -164,9 +164,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); diff --git a/src/types.rs b/src/types.rs index bec23579cda..17e9a467d1b 100644 --- a/src/types.rs +++ b/src/types.rs @@ -384,8 +384,7 @@ impl Rewrite for ast::WherePredicate { Shape::legacy(budget, shape.indent + used_width)) }) .collect::<Option<Vec<_>>>() - ) - .join(joiner); + ).join(joiner); if context.config.spaces_within_angle_brackets() && lifetime_str.len() > 0 { format!("for< {} > {}{}{}", @@ -411,8 +410,7 @@ impl Rewrite for ast::WherePredicate { Shape::legacy(budget, shape.indent + used_width)) }) .collect::<Option<Vec<_>>>() - ) - .join(joiner); + ).join(joiner); format!("{}{}{}", type_str, colon, bounds_str) } |
