File tree 3 files changed +43
-2
lines changed
3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,9 @@ impl Rewrite for Pat {
76
76
if pat_vec. is_empty ( ) {
77
77
Some ( path_str)
78
78
} else {
79
- // 1 = (
80
- let width = try_opt ! ( width. checked_sub( path_str. len( ) + 1 ) ) ;
79
+ // 2 = "()".len()
80
+ let width = try_opt ! ( width. checked_sub( path_str. len( ) + 2 ) ) ;
81
+ // 1 = "(".len()
81
82
let offset = offset + path_str. len ( ) + 1 ;
82
83
let items = itemize_list ( context. codemap ,
83
84
pat_vec. iter ( ) ,
Original file line number Diff line number Diff line change
1
+ mod client {
2
+ impl Client {
3
+ fn test ( self ) -> Result < ( ) > {
4
+ let next_state = match self . state {
5
+ State :: V5 ( v5:: State :: Command ( v5:: coand:: State :: WriteVersion ( ref mut response) ) ) => {
6
+ let x = reformat . meeee ( ) ;
7
+ }
8
+ } ;
9
+
10
+ let next_state = match self . state {
11
+ State :: V5 ( v5:: State :: Command ( v5:: comand:: State :: WriteVersion ( ref mut response) ) ) => {
12
+ // The pattern cannot be formatted in a way that the match stays
13
+ // within the column limit. The rewrite should therefore be
14
+ // skipped.
15
+ let x = dont . reformat . meeee ( ) ;
16
+ }
17
+ } ;
18
+ }
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ mod client {
2
+ impl Client {
3
+ fn test ( self ) -> Result < ( ) > {
4
+ let next_state = match self . state {
5
+ State :: V5 ( v5:: State :: Command ( v5:: coand:: State :: WriteVersion ( ref mut response) ) ) => {
6
+ let x = reformat. meeee ( ) ;
7
+ }
8
+ } ;
9
+
10
+ let next_state = match self . state {
11
+ State :: V5 ( v5:: State :: Command ( v5:: comand:: State :: WriteVersion ( ref mut response) ) ) => {
12
+ // The pattern cannot be formatted in a way that the match stays
13
+ // within the column limit. The rewrite should therefore be
14
+ // skipped.
15
+ let x = dont . reformat . meeee ( ) ;
16
+ }
17
+ } ;
18
+ }
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments