fix the logic

This commit is contained in:
Febriananda Wida Pramudita 2024-04-13 21:11:43 +07:00 committed by Yacin Tmimi
parent 4b1596f8a1
commit 22a4306a7e

View File

@ -103,9 +103,12 @@ 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 {
inner_attrs shape.indent.block_indent(context.config);
let result = inner_attrs
.rewrite(context, shape) .rewrite(context, shape)
.map(|s| format!("{}{}\n", nested_indent_str, s))? .map(|s| format!("{}{}\n", nested_indent_str, s))?;
shape.indent.block_unindent(context.config);
result
}; };
let open_brace_pos = if inner_attrs.is_empty() { let open_brace_pos = if inner_attrs.is_empty() {