diff --git a/src/matches.rs b/src/matches.rs index e59413647a9..72ec10517d2 100644 --- a/src/matches.rs +++ b/src/matches.rs @@ -103,15 +103,14 @@ pub(crate) fn rewrite_match( let inner_attrs_str = if inner_attrs.is_empty() { String::new() } else { - if context.config.version() == Version::One { - inner_attrs - .rewrite(context, shape) - .map(|s| format!("{}{}\n", nested_indent_str, s))? + let shape = if context.config.version() == Version::One { + shape } else { - inner_attrs - .rewrite(context, shape.block_indent(context.config.tab_spaces())) - .map(|s| format!("{}{}\n", nested_indent_str, s))? - } + shape.block_indent(context.config.tab_spaces()) + }; + inner_attrs + .rewrite(context, shape) + .map(|s| format!("{}{}\n", nested_indent_str, s))? }; let open_brace_pos = if inner_attrs.is_empty() {