Update src/matches.rs
Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
This commit is contained in:
parent
23c11f3a08
commit
1f806d979a
1 changed files with 7 additions and 8 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue