1
- error: Unnecessary nested match
1
+ error: unnecessary nested match
2
2
--> $DIR/collapsible_match.rs:7:20
3
3
|
4
4
LL | Ok(val) => match val {
@@ -9,15 +9,15 @@ LL | | },
9
9
| |_________^
10
10
|
11
11
= note: `-D clippy::collapsible-match` implied by `-D warnings`
12
- help: The outer pattern can be modified to include the inner pattern.
12
+ help: the outer pattern can be modified to include the inner pattern
13
13
--> $DIR/collapsible_match.rs:7:12
14
14
|
15
15
LL | Ok(val) => match val {
16
- | ^^^ Replace this binding
16
+ | ^^^ replace this binding
17
17
LL | Some(n) => foo(n),
18
18
| ^^^^^^^ with this pattern
19
19
20
- error: Unnecessary nested match
20
+ error: unnecessary nested match
21
21
--> $DIR/collapsible_match.rs:16:20
22
22
|
23
23
LL | Ok(val) => match val {
@@ -27,31 +27,31 @@ LL | | _ => return,
27
27
LL | | },
28
28
| |_________^
29
29
|
30
- help: The outer pattern can be modified to include the inner pattern.
30
+ help: the outer pattern can be modified to include the inner pattern
31
31
--> $DIR/collapsible_match.rs:16:12
32
32
|
33
33
LL | Ok(val) => match val {
34
- | ^^^ Replace this binding
34
+ | ^^^ replace this binding
35
35
LL | Some(n) => foo(n),
36
36
| ^^^^^^^ with this pattern
37
37
38
- error: Unnecessary nested match
38
+ error: unnecessary nested match
39
39
--> $DIR/collapsible_match.rs:25:9
40
40
|
41
41
LL | / if let Some(n) = val {
42
42
LL | | take(n);
43
43
LL | | }
44
44
| |_________^
45
45
|
46
- help: The outer pattern can be modified to include the inner pattern.
46
+ help: the outer pattern can be modified to include the inner pattern
47
47
--> $DIR/collapsible_match.rs:24:15
48
48
|
49
49
LL | if let Ok(val) = res_opt {
50
- | ^^^ Replace this binding
50
+ | ^^^ replace this binding
51
51
LL | if let Some(n) = val {
52
52
| ^^^^^^^ with this pattern
53
53
54
- error: Unnecessary nested match
54
+ error: unnecessary nested match
55
55
--> $DIR/collapsible_match.rs:32:9
56
56
|
57
57
LL | / if let Some(n) = val {
@@ -61,15 +61,15 @@ LL | | return;
61
61
LL | | }
62
62
| |_________^
63
63
|
64
- help: The outer pattern can be modified to include the inner pattern.
64
+ help: the outer pattern can be modified to include the inner pattern
65
65
--> $DIR/collapsible_match.rs:31:15
66
66
|
67
67
LL | if let Ok(val) = res_opt {
68
- | ^^^ Replace this binding
68
+ | ^^^ replace this binding
69
69
LL | if let Some(n) = val {
70
70
| ^^^^^^^ with this pattern
71
71
72
- error: Unnecessary nested match
72
+ error: unnecessary nested match
73
73
--> $DIR/collapsible_match.rs:43:9
74
74
|
75
75
LL | / match val {
@@ -78,32 +78,32 @@ LL | | _ => (),
78
78
LL | | }
79
79
| |_________^
80
80
|
81
- help: The outer pattern can be modified to include the inner pattern.
81
+ help: the outer pattern can be modified to include the inner pattern
82
82
--> $DIR/collapsible_match.rs:42:15
83
83
|
84
84
LL | if let Ok(val) = res_opt {
85
- | ^^^ Replace this binding
85
+ | ^^^ replace this binding
86
86
LL | match val {
87
87
LL | Some(n) => foo(n),
88
88
| ^^^^^^^ with this pattern
89
89
90
- error: Unnecessary nested match
90
+ error: unnecessary nested match
91
91
--> $DIR/collapsible_match.rs:52:13
92
92
|
93
93
LL | / if let Some(n) = val {
94
94
LL | | take(n);
95
95
LL | | }
96
96
| |_____________^
97
97
|
98
- help: The outer pattern can be modified to include the inner pattern.
98
+ help: the outer pattern can be modified to include the inner pattern
99
99
--> $DIR/collapsible_match.rs:51:12
100
100
|
101
101
LL | Ok(val) => {
102
- | ^^^ Replace this binding
102
+ | ^^^ replace this binding
103
103
LL | if let Some(n) = val {
104
104
| ^^^^^^^ with this pattern
105
105
106
- error: Unnecessary nested match
106
+ error: unnecessary nested match
107
107
--> $DIR/collapsible_match.rs:61:9
108
108
|
109
109
LL | / match val {
@@ -112,16 +112,16 @@ LL | | _ => return,
112
112
LL | | }
113
113
| |_________^
114
114
|
115
- help: The outer pattern can be modified to include the inner pattern.
115
+ help: the outer pattern can be modified to include the inner pattern
116
116
--> $DIR/collapsible_match.rs:60:15
117
117
|
118
118
LL | if let Ok(val) = res_opt {
119
- | ^^^ Replace this binding
119
+ | ^^^ replace this binding
120
120
LL | match val {
121
121
LL | Some(n) => foo(n),
122
122
| ^^^^^^^ with this pattern
123
123
124
- error: Unnecessary nested match
124
+ error: unnecessary nested match
125
125
--> $DIR/collapsible_match.rs:72:13
126
126
|
127
127
LL | / if let Some(n) = val {
@@ -131,15 +131,15 @@ LL | | return;
131
131
LL | | }
132
132
| |_____________^
133
133
|
134
- help: The outer pattern can be modified to include the inner pattern.
134
+ help: the outer pattern can be modified to include the inner pattern
135
135
--> $DIR/collapsible_match.rs:71:12
136
136
|
137
137
LL | Ok(val) => {
138
- | ^^^ Replace this binding
138
+ | ^^^ replace this binding
139
139
LL | if let Some(n) = val {
140
140
| ^^^^^^^ with this pattern
141
141
142
- error: Unnecessary nested match
142
+ error: unnecessary nested match
143
143
--> $DIR/collapsible_match.rs:83:20
144
144
|
145
145
LL | Ok(val) => match val {
@@ -149,15 +149,15 @@ LL | | None => return,
149
149
LL | | },
150
150
| |_________^
151
151
|
152
- help: The outer pattern can be modified to include the inner pattern.
152
+ help: the outer pattern can be modified to include the inner pattern
153
153
--> $DIR/collapsible_match.rs:83:12
154
154
|
155
155
LL | Ok(val) => match val {
156
- | ^^^ Replace this binding
156
+ | ^^^ replace this binding
157
157
LL | Some(n) => foo(n),
158
158
| ^^^^^^^ with this pattern
159
159
160
- error: Unnecessary nested match
160
+ error: unnecessary nested match
161
161
--> $DIR/collapsible_match.rs:92:22
162
162
|
163
163
LL | Some(val) => match val {
@@ -167,11 +167,11 @@ LL | | _ => return,
167
167
LL | | },
168
168
| |_________^
169
169
|
170
- help: The outer pattern can be modified to include the inner pattern.
170
+ help: the outer pattern can be modified to include the inner pattern
171
171
--> $DIR/collapsible_match.rs:92:14
172
172
|
173
173
LL | Some(val) => match val {
174
- | ^^^ Replace this binding
174
+ | ^^^ replace this binding
175
175
LL | Some(n) => foo(n),
176
176
| ^^^^^^^ with this pattern
177
177
0 commit comments