Update TupleParentheses usage (#5810)

This commit is contained in:
Chris Pryer 2023-07-24 10:44:36 -04:00 committed by GitHub
parent 8a7dcb794b
commit 8eadacda33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 88 additions and 30 deletions

View file

@ -49,7 +49,7 @@ impl FormatNodeRule<ExprSubscript> for FormatExprSubscript {
let result = if let Expr::Tuple(tuple) = slice.as_ref() {
tuple
.format()
.with_options(TupleParentheses::Subscript)
.with_options(TupleParentheses::Preserve)
.fmt(f)
} else {
slice.format().fmt(f)