File tree Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Expand file tree Collapse file tree 3 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,6 @@ pub enum DefinitiveListTactic {
19
19
Vertical ,
20
20
Horizontal ,
21
21
Mixed ,
22
- /// Tactic for nested import.
23
- NestedImport ,
24
22
/// Special case tactic for `format!()`, `write!()` style macros.
25
23
SpecialMacro ( usize ) ,
26
24
}
Original file line number Diff line number Diff line change @@ -706,16 +706,12 @@ fn rewrite_nested_use_tree(
706
706
shape. width . saturating_sub ( 2 )
707
707
} ;
708
708
709
- let tactic = if has_nested_list {
710
- DefinitiveListTactic :: NestedImport
711
- } else {
712
- definitive_tactic (
713
- & list_items,
714
- context. config . imports_layout ( ) ,
715
- Separator :: Comma ,
716
- remaining_width,
717
- )
718
- } ;
709
+ let tactic = definitive_tactic (
710
+ & list_items,
711
+ context. config . imports_layout ( ) ,
712
+ Separator :: Comma ,
713
+ remaining_width,
714
+ ) ;
719
715
720
716
let ends_with_newline = context. config . imports_indent ( ) == IndentStyle :: Block
721
717
&& tactic != DefinitiveListTactic :: Horizontal ;
Original file line number Diff line number Diff line change @@ -282,14 +282,13 @@ where
282
282
result. push ( '\n' ) ;
283
283
result. push_str ( indent_str) ;
284
284
}
285
- DefinitiveListTactic :: Mixed | DefinitiveListTactic :: NestedImport => {
285
+ DefinitiveListTactic :: Mixed => {
286
286
let total_width = total_item_width ( item) + item_sep_len;
287
287
288
288
// 1 is space between separator and item.
289
289
if ( line_len > 0 && line_len + 1 + total_width > formatting. shape . width )
290
290
|| prev_item_had_post_comment
291
- || ( tactic == DefinitiveListTactic :: NestedImport
292
- && ( prev_item_is_nested_import || ( !first && inner_item. contains ( "::" ) ) ) )
291
+ || ( prev_item_is_nested_import || ( !first && inner_item. contains ( "::" ) ) )
293
292
{
294
293
result. push ( '\n' ) ;
295
294
result. push_str ( indent_str) ;
You can’t perform that action at this time.
0 commit comments