about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
authorRyan1729 <Ryan1729@gmail.com>2017-04-04 00:01:33 -0600
committerRyan1729 <Ryan1729@gmail.com>2017-04-04 00:01:33 -0600
commiteb25ac5e11cc99713d512d2f5518f94d7de18eb0 (patch)
tree75acb71bb3b97065b69f4478c09f34df69eb8699 /src/expr.rs
parent4c4f70957bc40f9aae377ec67af62f6f3c4aa9f9 (diff)
eliminate nested match
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs8
1 files 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<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,