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() {
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user