Do not add missing snippet between arms if it's just spaces

This commit is contained in:
topecongiro 2017-08-05 15:23:23 +09:00
parent 60fb11e5dd
commit d4bf413956

View File

@ -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);