Skip to content

Commit

Permalink
clarify the version-gate used for the rust-lang#3229 change
Browse files Browse the repository at this point in the history
  • Loading branch information
scampi committed Dec 19, 2018
1 parent 36e2cb0 commit 8464d3b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,10 @@ fn rewrite_match_body(
} else {
""
};
let semicolon =
if context.config.version() == Version::Two && semicolon_for_expr(context, body) {
";"
} else {
""
};
let semicolon = match context.config.version() {
Version::Two if semicolon_for_expr(context, body) => ";",
_ => "",
};
("{", format!("{}{}}}{}", semicolon, indent_str, comma))
} else {
("", String::from(","))
Expand Down

0 comments on commit 8464d3b

Please sign in to comment.