Skip to content

Commit 87afdf4

Browse files
committed
Combine PatKind::TupleStruct
1 parent dc035bb commit 87afdf4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/patterns.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,10 @@ impl<'a> Spanned for TuplePatField<'a> {
247247
pub fn can_be_overflowed_pat(context: &RewriteContext, pat: &TuplePatField, len: usize) -> bool {
248248
match *pat {
249249
TuplePatField::Pat(pat) => match pat.node {
250-
ast::PatKind::Path(..) | ast::PatKind::Tuple(..) | ast::PatKind::Struct(..) => {
251-
context.use_block_indent() && len == 1
252-
}
250+
ast::PatKind::Path(..) |
251+
ast::PatKind::Tuple(..) |
252+
ast::PatKind::Struct(..) |
253+
ast::PatKind::TupleStruct(..) => context.use_block_indent() && len == 1,
253254
ast::PatKind::Ref(ref p, _) | ast::PatKind::Box(ref p) => {
254255
can_be_overflowed_pat(context, &TuplePatField::Pat(p), len)
255256
}

0 commit comments

Comments
 (0)