File tree Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ macro_rules! create_config {
130
130
pub fn $i( & mut self , value: $ty) {
131
131
( self . 0 ) . $i. 2 = value;
132
132
match stringify!( $i) {
133
- "use_small_heuristics" => self . 0 . set_heuristics( ) ,
133
+ "max_width" | " use_small_heuristics" => self . 0 . set_heuristics( ) ,
134
134
"license_template_path" => self . 0 . set_license_template( ) ,
135
135
& _ => ( ) ,
136
136
}
@@ -292,7 +292,7 @@ macro_rules! create_config {
292
292
}
293
293
294
294
match key {
295
- "use_small_heuristics" => self . set_heuristics( ) ,
295
+ "max_width" | " use_small_heuristics" => self . set_heuristics( ) ,
296
296
"license_template_path" => self . set_license_template( ) ,
297
297
& _ => ( ) ,
298
298
}
Original file line number Diff line number Diff line change
1
+ // rustfmt-max_width: 120
2
+
3
+ // elems on multiple lines for max_width 100, but same line for max_width 120
4
+ fn foo ( e : Enum ) {
5
+ match e {
6
+ Enum :: Var {
7
+ elem1,
8
+ elem2,
9
+ elem3,
10
+ } => {
11
+ return ;
12
+ }
13
+ }
14
+ }
15
+
16
+ // elems not on same line for either max_width 100 or 120
17
+ fn bar ( e : Enum ) {
18
+ match e {
19
+ Enum :: Var {
20
+ elem1,
21
+ elem2,
22
+ elem3,
23
+ elem4,
24
+ } => {
25
+ return ;
26
+ }
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ // rustfmt-max_width: 120
2
+
3
+ // elems on multiple lines for max_width 100, but same line for max_width 120
4
+ fn foo ( e : Enum ) {
5
+ match e {
6
+ Enum :: Var { elem1, elem2, elem3 } => {
7
+ return ;
8
+ }
9
+ }
10
+ }
11
+
12
+ // elems not on same line for either max_width 100 or 120
13
+ fn bar ( e : Enum ) {
14
+ match e {
15
+ Enum :: Var {
16
+ elem1,
17
+ elem2,
18
+ elem3,
19
+ elem4,
20
+ } => {
21
+ return ;
22
+ }
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments