Combine PatKind::TupleStruct
This commit is contained in:
parent
dc035bbbee
commit
87afdf4467
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user