Temporarily replace RangeEnd::Included with _

This commit is contained in:
Badel2
2017-09-25 20:51:19 +02:00
parent e8d3a22395
commit 2f81933272
+13 -10
View File
@@ -59,16 +59,6 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
None
},
PatKind::Range(ref lhs, ref rhs, ref end_kind) => match *end_kind {
RangeEnd::Included => rewrite_pair(
&**lhs,
&**rhs,
"",
"...",
"",
context,
shape,
SeparatorPlace::Front,
),
RangeEnd::Excluded => rewrite_pair(
&**lhs,
&**rhs,
@@ -79,6 +69,19 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
shape,
SeparatorPlace::Front,
),
// FIXME: Change _ to RangeEnd::Included(RangeSyntax::DotDotDot)
// and add RangeEnd::Included(RangeSyntax::DotDotEq)
// once rust PR #44709 gets merged
_ => rewrite_pair(
&**lhs,
&**rhs,
"",
"...",
"",
context,
shape,
SeparatorPlace::Front,
),
},
PatKind::Ref(ref pat, mutability) => {
let prefix = format!("&{}", format_mutability(mutability));