about summary refs log tree commit diff
path: root/src/patterns.rs
diff options
context:
space:
mode:
authortopecongiro <seuchida@gmail.com>2017-11-05 14:17:46 +0900
committertopecongiro <seuchida@gmail.com>2017-11-06 13:52:25 +0900
commitc73871c516f659262bb70a38b50e949f8ca39023 (patch)
treecbb5bc0669dccd96b59200429454a33c059ca2f9 /src/patterns.rs
parent10cb568c18a4efb5655a0eaa3bd7bd11c441aa6c (diff)
Introduce PairParts to reduce the number of args of rewrite_pair()
Diffstat (limited to 'src/patterns.rs')
-rw-r--r--src/patterns.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/patterns.rs b/src/patterns.rs
index 92e385543b7..38d850962bb 100644
--- a/src/patterns.rs
+++ b/src/patterns.rs
@@ -16,7 +16,7 @@ use spanned::Spanned;
 use codemap::SpanUtils;
 use comment::FindUncommented;
 use expr::{can_be_overflowed_expr, rewrite_call_inner, rewrite_pair, rewrite_unary_prefix,
-           wrap_struct_field};
+           wrap_struct_field, PairParts};
 use lists::{itemize_list, shape_for_tactic, struct_lit_formatting, struct_lit_shape,
             struct_lit_tactic, write_list, DefinitiveListTactic, SeparatorPlace, SeparatorTactic};
 use rewrite::{Rewrite, RewriteContext};
@@ -65,9 +65,7 @@ impl Rewrite for Pat {
                 rewrite_pair(
                     &**lhs,
                     &**rhs,
-                    "",
-                    infix,
-                    "",
+                    &PairParts("", infix, ""),
                     context,
                     shape,
                     SeparatorPlace::Front,