about summary refs log tree commit diff
path: root/src/expr.rs
diff options
context:
space:
mode:
authorDavid Barnett <david@barnett.net.nz>2015-11-20 10:37:00 +1300
committerDavid Barnett <david@barnett.net.nz>2015-11-20 10:37:00 +1300
commitb3f41e82fcf9423beaf938308f2034f5dfa508cb (patch)
treeffae12d5e084409f7c965c970d95480d099c297d /src/expr.rs
parente44a7a2800c6ee516679e714f694ba2d8a0f2039 (diff)
Use tactic instead of config
Add mixed test
Mixed is unreachable as there is no input combination that could get
to this value
Diffstat (limited to 'src/expr.rs')
-rw-r--r--src/expr.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/expr.rs b/src/expr.rs
index 5a281f2df83..7e0407465b9 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1335,9 +1335,10 @@ fn rewrite_struct_lit<'a>(context: &RewriteContext,
         },
         indent: indent,
         width: budget,
-        ends_with_newline: match context.config.struct_lit_style {
-            StructLitStyle::Block => true,
-            StructLitStyle::Visual => false,
+        ends_with_newline: match tactic {
+            DefinitiveListTactic::Horizontal => false,
+            DefinitiveListTactic::Vertical => true,
+            DefinitiveListTactic::Mixed => unreachable!(),
         },
         config: context.config,
     };