refactor if into match

This commit is contained in:
Febriananda Wida Pramudita 2024-04-26 14:25:51 +07:00 committed by Yacin Tmimi
parent 1f806d979a
commit 76ab3c19d8

View File

@ -103,10 +103,9 @@ pub(crate) fn rewrite_match(
let inner_attrs_str = if inner_attrs.is_empty() { let inner_attrs_str = if inner_attrs.is_empty() {
String::new() String::new()
} else { } else {
let shape = if context.config.version() == Version::One { let shape = match context.config.version() {
shape Version::One => shape,
} else { _ => shape.block_indent(context.config.tab_spaces())
shape.block_indent(context.config.tab_spaces())
}; };
inner_attrs inner_attrs
.rewrite(context, shape) .rewrite(context, shape)