diff --git a/src/expr.rs b/src/expr.rs index a847733e7bd..d276bcc2951 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1615,7 +1615,9 @@ fn rewrite_match_arms( arm_shape, &arm_indent_str, )); - result.push_str(&comment); + if !comment.chars().all(|c| c == ' ') { + result.push_str(&comment); + } result.push('\n'); result.push_str(&arm_indent_str);