mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
Keep brace on same line as match when using ClosingNextLine for control_brace_style.
This commit is contained in:
+2
-2
@@ -1461,8 +1461,8 @@ fn rewrite_match(
|
||||
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 block_sep = match context.config.control_brace_style() {
|
||||
ControlBraceStyle::AlwaysSameLine => " ",
|
||||
_ => alt_block_sep.as_str(),
|
||||
ControlBraceStyle::AlwaysNextLine => alt_block_sep.as_str(),
|
||||
_ => " ",
|
||||
};
|
||||
let mut result = format!("match {}{}{{", cond_str, block_sep);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user