We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649fdd4 commit 51b5f80Copy full SHA for 51b5f80
ast/src/unparse.rs
@@ -379,12 +379,7 @@ impl<'a> Unparser<'a> {
379
}
380
Expr::Subscript(crate::ExprSubscript { value, slice, .. }) => {
381
self.unparse_expr(value, precedence::ATOM)?;
382
- let mut lvl = precedence::TUPLE;
383
- if let Expr::Tuple(crate::ExprTuple { elts, .. }) = slice.as_ref() {
384
- if elts.iter().any(|expr| expr.is_starred_expr()) {
385
- lvl += 1
386
- }
387
+ let lvl = precedence::TUPLE;
388
self.p("[")?;
389
self.unparse_expr(slice, lvl)?;
390
self.p("]")?;
0 commit comments