diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2016-04-22 19:03:36 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2016-04-22 19:18:48 +1200 |
| commit | a9c3108c9cd6267ebaf2489fb65a07b88a4f9d4e (patch) | |
| tree | c9eb80274f8382daa8d5bd27605525af09a79598 /src/chains.rs | |
| parent | 9761cf71d8384db2a75c7595b082dd7764575851 (diff) | |
Change defaults and update tests and source
New defaults are `Tabbed` for `chain_indent` and `chain_base_indent`, and `5` for `closure_block_indent_threshold`.
Diffstat (limited to 'src/chains.rs')
| -rw-r--r-- | src/chains.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/chains.rs b/src/chains.rs index ec9e6685878..255db49386c 100644 --- a/src/chains.rs +++ b/src/chains.rs @@ -132,15 +132,9 @@ pub fn rewrite_chain(expr: &ast::Expr, let max_width = try_opt!((width + offset.width()).checked_sub(indent.width())); let mut rewrites = try_opt!(subexpr_list.iter() - .rev() - .map(|e| { - rewrite_chain_subexpr(e, - total_span, - context, - max_width, - indent) - }) - .collect::<Option<Vec<_>>>()); + .rev() + .map(|e| rewrite_chain_subexpr(e, total_span, context, max_width, indent)) + .collect::<Option<Vec<_>>>()); // Total of all items excluding the last. let almost_total = rewrites[..rewrites.len() - 1] @@ -367,8 +361,8 @@ fn rewrite_method_call(method_name: ast::Ident, (args[0].span.hi, String::new()) } else { let type_list: Vec<_> = try_opt!(types.iter() - .map(|ty| ty.rewrite(context, width, offset)) - .collect()); + .map(|ty| ty.rewrite(context, width, offset)) + .collect()); (types.last().unwrap().span.hi, format!("::<{}>", type_list.join(", "))) }; |
