Avoid line break before for in comprehension if outer expression expands (#5912)
This commit is contained in:
@@ -31,14 +31,14 @@ impl FormatNodeRule<ExprDictComp> for FormatExprDictComp {
|
||||
f,
|
||||
[parenthesized(
|
||||
"{",
|
||||
&format_args!(
|
||||
&group(&format_args!(
|
||||
group(&key.format()),
|
||||
text(":"),
|
||||
space(),
|
||||
value.format(),
|
||||
soft_line_break_or_space(),
|
||||
group(&joined)
|
||||
),
|
||||
)),
|
||||
"}"
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -28,11 +28,11 @@ impl FormatNodeRule<ExprListComp> for FormatExprListComp {
|
||||
f,
|
||||
[parenthesized(
|
||||
"[",
|
||||
&format_args!(
|
||||
&group(&format_args![
|
||||
group(&elt.format()),
|
||||
soft_line_break_or_space(),
|
||||
group(&joined)
|
||||
),
|
||||
]),
|
||||
"]"
|
||||
)]
|
||||
)
|
||||
|
||||
@@ -28,11 +28,11 @@ impl FormatNodeRule<ExprSetComp> for FormatExprSetComp {
|
||||
f,
|
||||
[parenthesized(
|
||||
"{",
|
||||
&format_args!(
|
||||
&group(&format_args!(
|
||||
group(&elt.format()),
|
||||
soft_line_break_or_space(),
|
||||
group(&joined)
|
||||
),
|
||||
)),
|
||||
"}"
|
||||
)]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user