From 8464d3ba6fe07021fa3c9886337b871651623313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Campinas?= Date: Wed, 19 Dec 2018 09:25:04 +0100 Subject: [PATCH] clarify the version-gate used for the #3229 change --- src/matches.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/matches.rs b/src/matches.rs index 14733eece86..0d061e01f4b 100644 --- a/src/matches.rs +++ b/src/matches.rs @@ -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(","))