Use correct one line budget for array in Block indent style

This commit is contained in:
topecongiro 2017-07-05 19:19:54 +09:00
parent 818ff7a602
commit d613f75676

View File

@ -464,8 +464,16 @@ where
1 // "["
};
let nested_shape = match context.config.array_layout() {
IndentStyle::Block => shape.block().block_indent(context.config.tab_spaces()),
let mut nested_shape = match context.config.array_layout() {
IndentStyle::Block => {
try_opt!(
shape
.block()
.block_indent(context.config.tab_spaces())
.with_max_width(context.config)
.sub_width(1)
)
}
IndentStyle::Visual => {
try_opt!(
shape