refactor if into match
This commit is contained in:
parent
1f806d979a
commit
76ab3c19d8
@ -103,10 +103,9 @@ pub(crate) fn rewrite_match(
|
||||
let inner_attrs_str = if inner_attrs.is_empty() {
|
||||
String::new()
|
||||
} else {
|
||||
let shape = if context.config.version() == Version::One {
|
||||
shape
|
||||
} else {
|
||||
shape.block_indent(context.config.tab_spaces())
|
||||
let shape = match context.config.version() {
|
||||
Version::One => shape,
|
||||
_ => shape.block_indent(context.config.tab_spaces())
|
||||
};
|
||||
inner_attrs
|
||||
.rewrite(context, shape)
|
||||
|
Loading…
x
Reference in New Issue
Block a user