mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Do not add offset to match pattern when using Rfc style
This commit is contained in:
parent
d7de5b7656
commit
86be2e7bf8
@ -1205,8 +1205,10 @@ fn rewrite_match(context: &RewriteContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// `match `cond` {`
|
// `match `cond` {`
|
||||||
let cond_shape = try_opt!(shape.shrink_left(6));
|
let cond_shape = match context.config.control_style() {
|
||||||
let cond_shape = try_opt!(cond_shape.sub_width(2));
|
Style::Legacy => try_opt!(shape.shrink_left(6).and_then(|s| s.sub_width(2))),
|
||||||
|
Style::Rfc => try_opt!(shape.sub_width(8)),
|
||||||
|
};
|
||||||
let cond_str = try_opt!(cond.rewrite(context, cond_shape));
|
let cond_str = try_opt!(cond.rewrite(context, cond_shape));
|
||||||
let alt_block_sep = String::from("\n") + &shape.indent.block_only().to_string(context.config);
|
let alt_block_sep = String::from("\n") + &shape.indent.block_only().to_string(context.config);
|
||||||
let block_sep = match context.config.control_brace_style() {
|
let block_sep = match context.config.control_brace_style() {
|
||||||
|
Loading…
Reference in New Issue
Block a user