Force multi line if the first attempt of rewriting args failed

This commit is contained in:
topecongiro 2017-06-12 18:34:38 +09:00
parent 9ad499786d
commit ad628f6acc

View File

@ -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 {