From d613f75676d50acce7f65fc5e54c9903e6100c4d Mon Sep 17 00:00:00 2001 From: topecongiro Date: Wed, 5 Jul 2017 19:19:54 +0900 Subject: [PATCH] Use correct one line budget for array in Block indent style --- src/expr.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/expr.rs b/src/expr.rs index dff1521f14a..81168b3618c 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -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