Skip to content

Commit d613f75

Browse files
committed
Use correct one line budget for array in Block indent style
1 parent 818ff7a commit d613f75

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/expr.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,16 @@ where
464464
1 // "["
465465
};
466466

467-
let nested_shape = match context.config.array_layout() {
468-
IndentStyle::Block => shape.block().block_indent(context.config.tab_spaces()),
467+
let mut nested_shape = match context.config.array_layout() {
468+
IndentStyle::Block => {
469+
try_opt!(
470+
shape
471+
.block()
472+
.block_indent(context.config.tab_spaces())
473+
.with_max_width(context.config)
474+
.sub_width(1)
475+
)
476+
}
469477
IndentStyle::Visual => {
470478
try_opt!(
471479
shape

0 commit comments

Comments
 (0)