From 87afdf44672e407033278ae951cb378dbd0104db Mon Sep 17 00:00:00 2001 From: topecongiro Date: Thu, 2 Nov 2017 20:29:10 +0900 Subject: [PATCH] Combine PatKind::TupleStruct --- src/patterns.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/patterns.rs b/src/patterns.rs index e4b24bafe2e3..92e385543b7a 100644 --- a/src/patterns.rs +++ b/src/patterns.rs @@ -247,9 +247,10 @@ impl<'a> Spanned for TuplePatField<'a> { pub fn can_be_overflowed_pat(context: &RewriteContext, pat: &TuplePatField, len: usize) -> bool { match *pat { TuplePatField::Pat(pat) => match pat.node { - ast::PatKind::Path(..) | ast::PatKind::Tuple(..) | ast::PatKind::Struct(..) => { - context.use_block_indent() && len == 1 - } + ast::PatKind::Path(..) | + ast::PatKind::Tuple(..) | + ast::PatKind::Struct(..) | + ast::PatKind::TupleStruct(..) => context.use_block_indent() && len == 1, ast::PatKind::Ref(ref p, _) | ast::PatKind::Box(ref p) => { can_be_overflowed_pat(context, &TuplePatField::Pat(p), len) }