Rearrange logic of needs_par computation in print_let
True || needs_par_as_let_scrutinee(...) is always true.
This commit is contained in:
@@ -1166,8 +1166,11 @@ impl<'a> State<'a> {
|
|||||||
| ast::ExprKind::Closure(..)
|
| ast::ExprKind::Closure(..)
|
||||||
| ast::ExprKind::Ret(..)
|
| ast::ExprKind::Ret(..)
|
||||||
| ast::ExprKind::Yeet(..) => true,
|
| ast::ExprKind::Yeet(..) => true,
|
||||||
_ => parser::contains_exterior_struct_lit(expr),
|
_ => {
|
||||||
} || parser::needs_par_as_let_scrutinee(expr.precedence().order()),
|
parser::contains_exterior_struct_lit(expr)
|
||||||
|
|| parser::needs_par_as_let_scrutinee(expr.precedence().order())
|
||||||
|
}
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user