Put the second element of a chain on its own line when block formatting.
This commit is contained in:
parent
8bca85c4b6
commit
038436919d
@ -113,7 +113,8 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) -
|
||||
} else {
|
||||
chain_indent(context, shape.add_offset(parent_rewrite.len()))
|
||||
};
|
||||
(nested_shape, true)
|
||||
(nested_shape, context.config.chain_indent == IndentStyle::Visual ||
|
||||
parent_rewrite.len() <= context.config.tab_spaces)
|
||||
} else if is_block_expr(&parent, &parent_rewrite) {
|
||||
// The parent is a block, so align the rest of the chain with the closing
|
||||
// brace.
|
||||
|
Loading…
Reference in New Issue
Block a user