mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Update src/matches.rs
Co-authored-by: Yacin Tmimi <yacintmimi@gmail.com>
This commit is contained in:
parent
23c11f3a08
commit
1f806d979a
@ -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…
Reference in New Issue
Block a user