Skip to content

Commit e305262

Browse files
committed
clarify the version-gate used for the rust-lang#3229 change
1 parent 36e2cb0 commit e305262

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/matches.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,12 +413,15 @@ fn rewrite_match_body(
413413
} else {
414414
""
415415
};
416-
let semicolon =
417-
if context.config.version() == Version::Two && semicolon_for_expr(context, body) {
416+
let semicolon = if context.config.version() == Version::One {
417+
""
418+
} else {
419+
if semicolon_for_expr(context, body) {
418420
";"
419421
} else {
420422
""
421-
};
423+
}
424+
};
422425
("{", format!("{}{}}}{}", semicolon, indent_str, comma))
423426
} else {
424427
("", String::from(","))

0 commit comments

Comments
 (0)