diff options
| author | csmoe <35686186+csmoe@users.noreply.github.com> | 2018-05-02 22:11:50 +0800 |
|---|---|---|
| committer | csmoe <35686186+csmoe@users.noreply.github.com> | 2018-05-03 10:26:53 +0800 |
| commit | 8c8676cd30009a028fc8ea2cceea563abc451b53 (patch) | |
| tree | aa4a9da738328117f7287dc0495693dad358ea03 /src | |
| parent | 36c49d703a429ff2d324453b11a2f243491fb444 (diff) | |
fix merge_mix
Diffstat (limited to 'src')
| -rw-r--r-- | src/imports.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/imports.rs b/src/imports.rs index 669cf795bc7..05b10519d45 100644 --- a/src/imports.rs +++ b/src/imports.rs @@ -693,19 +693,20 @@ fn rewrite_nested_use_tree( _ => false, }) }); - let (tactic, remaining_width) = if has_nested_list { - (DefinitiveListTactic::Vertical, 0) + + let remaining_width = if has_nested_list { + 0 } else { - let remaining_width = shape.width.checked_sub(2).unwrap_or(0); - let tactic = definitive_tactic( - &list_items, - context.config.imports_layout(), - Separator::Comma, - remaining_width, - ); - (tactic, remaining_width) + shape.width.checked_sub(2).unwrap_or(0) }; + let tactic = definitive_tactic( + &list_items, + context.config.imports_layout(), + Separator::Comma, + remaining_width, + ); + let ends_with_newline = context.config.imports_indent() == IndentStyle::Block && tactic != DefinitiveListTactic::Horizontal; let fmt = ListFormatting { |
