diff options
| author | topecongiro <seuchida@gmail.com> | 2017-06-12 18:34:38 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-06-12 18:34:38 +0900 |
| commit | ad628f6accd7024305c8a564fbdf177ba5068ba3 (patch) | |
| tree | ff9bdfddbfb3d8af673f0de0d82bd4d21e650c04 /src | |
| parent | 9ad499786d1eb8008423d9d9810b47c4124e8d47 (diff) | |
Force multi line if the first attempt of rewriting args failed
Diffstat (limited to 'src')
| -rw-r--r-- | src/expr.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/expr.rs b/src/expr.rs index b47bf391ac1..cbe8671fd92 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1721,6 +1721,20 @@ fn rewrite_call_inner(context: &RewriteContext, nested_shape, one_line_width, force_trailing_comma) + .or_else(|| if context.use_block_indent() { + rewrite_call_args(context, + args, + args_span, + Shape::indented(shape + .block() + .indent + .block_indent(context.config), + context.config), + 0, + force_trailing_comma) + } else { + None + }) .ok_or(Ordering::Less)?; if !context.use_block_indent() && need_block_indent(&list_str, nested_shape) && !extendable { |
