File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ fn rewrite_nested_use_tree(
460
460
list_item. item = use_tree. rewrite ( context, nested_shape) ;
461
461
list_items. push ( list_item) ;
462
462
}
463
- let tactic = if use_tree_list. iter ( ) . any ( |use_segment| {
463
+ let ( tactic, remaining_width ) = if use_tree_list. iter ( ) . any ( |use_segment| {
464
464
use_segment
465
465
. path
466
466
. last ( )
@@ -469,14 +469,16 @@ fn rewrite_nested_use_tree(
469
469
_ => false ,
470
470
} )
471
471
} ) {
472
- DefinitiveListTactic :: Vertical
472
+ ( DefinitiveListTactic :: Vertical , 0 )
473
473
} else {
474
- definitive_tactic (
474
+ let remaining_width = shape. width . checked_sub ( 2 ) . unwrap_or ( 0 ) ;
475
+ let tactic = definitive_tactic (
475
476
& list_items,
476
477
context. config . imports_layout ( ) ,
477
478
Separator :: Comma ,
478
- shape. width . checked_sub ( 2 ) . unwrap_or ( 0 ) ,
479
- )
479
+ remaining_width,
480
+ ) ;
481
+ ( tactic, remaining_width)
480
482
} ;
481
483
let ends_with_newline = context. config . imports_indent ( ) == IndentStyle :: Block
482
484
&& tactic != DefinitiveListTactic :: Horizontal ;
You can’t perform that action at this time.
0 commit comments