File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -501,14 +501,21 @@ fn array_tactic<T: Rewrite + Spanned + ToExpr>(
501
501
502
502
match context. config . indent_style ( ) {
503
503
IndentStyle :: Block => {
504
- match shape. width . checked_sub ( 2 * bracket_size) {
504
+ let tactic = match shape. width . checked_sub ( 2 * bracket_size) {
505
505
Some ( width) => {
506
506
let tactic = ListTactic :: LimitedHorizontalVertical (
507
507
context. config . width_heuristics ( ) . array_width ,
508
508
) ;
509
509
definitive_tactic ( items, tactic, Separator :: Comma , width)
510
510
}
511
511
None => DefinitiveListTactic :: Vertical ,
512
+ } ;
513
+ if tactic == DefinitiveListTactic :: Vertical && !has_long_item
514
+ && is_every_args_simple ( exprs)
515
+ {
516
+ DefinitiveListTactic :: Mixed
517
+ } else {
518
+ tactic
512
519
}
513
520
}
514
521
IndentStyle :: Visual => {
You can’t perform that action at this time.
0 commit comments