File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -1315,17 +1315,17 @@ impl Rewrite for ast::Arm {
1315
1315
let indent_str = offset. block_indent ( context. config ) . to_string ( context. config ) ;
1316
1316
let ( body_prefix, body_suffix) = if context. config . wrap_match_arms {
1317
1317
if context. config . match_block_trailing_comma {
1318
- ( " {" , "}," )
1318
+ ( "{" , "}," )
1319
1319
} else {
1320
- ( " {" , "}" )
1320
+ ( "{" , "}" )
1321
1321
}
1322
1322
} else {
1323
1323
( "" , "" )
1324
1324
} ;
1325
1325
1326
1326
let block_sep = match context. config . control_brace_style {
1327
- ControlBraceStyle :: AlwaysNextLine => alt_block_sep,
1328
- ControlBraceStyle :: AlwaysSameLine => String :: from ( body_prefix ) + "\n " ,
1327
+ ControlBraceStyle :: AlwaysNextLine => alt_block_sep + body_prefix + " \n " ,
1328
+ ControlBraceStyle :: AlwaysSameLine => String :: from ( " " ) + body_prefix + "\n " ,
1329
1329
} ;
1330
1330
Some ( format ! ( "{}{} =>{}{}{}\n {}{}" ,
1331
1331
attr_str. trim_left( ) ,
Original file line number Diff line number Diff line change
1
+ // rustfmt-max_width: 80
2
+ // rustfmt-control_brace_style: AlwaysNextLine
3
+
4
+ fn main ( ) {
5
+ match x {
6
+ aaaaaaaa:: Bbbbb :: Ccccccccccccc ( _, Some ( ref x) ) if x ==
7
+ "aaaaaaaaaaa \
8
+ aaaaaaa \
9
+ aaaaaa" => {
10
+ Ok ( ( ) )
11
+ }
12
+ _ => Err ( x) ,
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-max_width: 80
2
+ // rustfmt-control_brace_style: AlwaysNextLine
3
+
4
+ fn main ( ) {
5
+ match x
6
+ {
7
+ aaaaaaaa:: Bbbbb :: Ccccccccccccc ( _, Some ( ref x) ) if x ==
8
+ "aaaaaaaaaaa \
9
+ aaaaaaa aaaaaa" =>
10
+ {
11
+ Ok ( ( ) )
12
+ }
13
+ _ => Err ( x) ,
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments