eliminate nested match

This commit is contained in:
Ryan1729 2017-04-04 00:01:33 -06:00
parent 4c4f70957b
commit eb25ac5e11

View File

@ -1730,13 +1730,11 @@ fn rewrite_call_inner<R>(context: &RewriteContext,
let fmt = ListFormatting {
tactic: tactic,
separator: ",",
trailing_separator: if force_no_trailing_comma {
trailing_separator: if force_no_trailing_comma ||
context.config.fn_call_style == IndentStyle::Visual {
SeparatorTactic::Never
} else {
match context.config.fn_call_style {
IndentStyle::Visual => SeparatorTactic::Never,
IndentStyle::Block => context.config.trailing_comma,
}
context.config.trailing_comma
},
shape: nested_shape,
ends_with_newline: false,