From eb25ac5e11cc99713d512d2f5518f94d7de18eb0 Mon Sep 17 00:00:00 2001 From: Ryan1729 Date: Tue, 4 Apr 2017 00:01:33 -0600 Subject: [PATCH] eliminate nested match --- src/expr.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/expr.rs b/src/expr.rs index 6561d3faf62..b472f283c6c 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1730,13 +1730,11 @@ fn rewrite_call_inner(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,