1- error: Unnecessary nested match
1+ error: unnecessary nested match
22 --> $DIR/collapsible_match.rs:7:20
33 |
44LL | Ok(val) => match val {
@@ -9,15 +9,15 @@ LL | | },
99 | |_________^
1010 |
1111 = 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
1313 --> $DIR/collapsible_match.rs:7:12
1414 |
1515LL | Ok(val) => match val {
16- | ^^^ Replace this binding
16+ | ^^^ replace this binding
1717LL | Some(n) => foo(n),
1818 | ^^^^^^^ with this pattern
1919
20- error: Unnecessary nested match
20+ error: unnecessary nested match
2121 --> $DIR/collapsible_match.rs:16:20
2222 |
2323LL | Ok(val) => match val {
@@ -27,31 +27,31 @@ LL | | _ => return,
2727LL | | },
2828 | |_________^
2929 |
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
3131 --> $DIR/collapsible_match.rs:16:12
3232 |
3333LL | Ok(val) => match val {
34- | ^^^ Replace this binding
34+ | ^^^ replace this binding
3535LL | Some(n) => foo(n),
3636 | ^^^^^^^ with this pattern
3737
38- error: Unnecessary nested match
38+ error: unnecessary nested match
3939 --> $DIR/collapsible_match.rs:25:9
4040 |
4141LL | / if let Some(n) = val {
4242LL | | take(n);
4343LL | | }
4444 | |_________^
4545 |
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
4747 --> $DIR/collapsible_match.rs:24:15
4848 |
4949LL | if let Ok(val) = res_opt {
50- | ^^^ Replace this binding
50+ | ^^^ replace this binding
5151LL | if let Some(n) = val {
5252 | ^^^^^^^ with this pattern
5353
54- error: Unnecessary nested match
54+ error: unnecessary nested match
5555 --> $DIR/collapsible_match.rs:32:9
5656 |
5757LL | / if let Some(n) = val {
@@ -61,15 +61,15 @@ LL | | return;
6161LL | | }
6262 | |_________^
6363 |
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
6565 --> $DIR/collapsible_match.rs:31:15
6666 |
6767LL | if let Ok(val) = res_opt {
68- | ^^^ Replace this binding
68+ | ^^^ replace this binding
6969LL | if let Some(n) = val {
7070 | ^^^^^^^ with this pattern
7171
72- error: Unnecessary nested match
72+ error: unnecessary nested match
7373 --> $DIR/collapsible_match.rs:43:9
7474 |
7575LL | / match val {
@@ -78,32 +78,32 @@ LL | | _ => (),
7878LL | | }
7979 | |_________^
8080 |
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
8282 --> $DIR/collapsible_match.rs:42:15
8383 |
8484LL | if let Ok(val) = res_opt {
85- | ^^^ Replace this binding
85+ | ^^^ replace this binding
8686LL | match val {
8787LL | Some(n) => foo(n),
8888 | ^^^^^^^ with this pattern
8989
90- error: Unnecessary nested match
90+ error: unnecessary nested match
9191 --> $DIR/collapsible_match.rs:52:13
9292 |
9393LL | / if let Some(n) = val {
9494LL | | take(n);
9595LL | | }
9696 | |_____________^
9797 |
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
9999 --> $DIR/collapsible_match.rs:51:12
100100 |
101101LL | Ok(val) => {
102- | ^^^ Replace this binding
102+ | ^^^ replace this binding
103103LL | if let Some(n) = val {
104104 | ^^^^^^^ with this pattern
105105
106- error: Unnecessary nested match
106+ error: unnecessary nested match
107107 --> $DIR/collapsible_match.rs:61:9
108108 |
109109LL | / match val {
@@ -112,16 +112,16 @@ LL | | _ => return,
112112LL | | }
113113 | |_________^
114114 |
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
116116 --> $DIR/collapsible_match.rs:60:15
117117 |
118118LL | if let Ok(val) = res_opt {
119- | ^^^ Replace this binding
119+ | ^^^ replace this binding
120120LL | match val {
121121LL | Some(n) => foo(n),
122122 | ^^^^^^^ with this pattern
123123
124- error: Unnecessary nested match
124+ error: unnecessary nested match
125125 --> $DIR/collapsible_match.rs:72:13
126126 |
127127LL | / if let Some(n) = val {
@@ -131,15 +131,15 @@ LL | | return;
131131LL | | }
132132 | |_____________^
133133 |
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
135135 --> $DIR/collapsible_match.rs:71:12
136136 |
137137LL | Ok(val) => {
138- | ^^^ Replace this binding
138+ | ^^^ replace this binding
139139LL | if let Some(n) = val {
140140 | ^^^^^^^ with this pattern
141141
142- error: Unnecessary nested match
142+ error: unnecessary nested match
143143 --> $DIR/collapsible_match.rs:83:20
144144 |
145145LL | Ok(val) => match val {
@@ -149,15 +149,15 @@ LL | | None => return,
149149LL | | },
150150 | |_________^
151151 |
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
153153 --> $DIR/collapsible_match.rs:83:12
154154 |
155155LL | Ok(val) => match val {
156- | ^^^ Replace this binding
156+ | ^^^ replace this binding
157157LL | Some(n) => foo(n),
158158 | ^^^^^^^ with this pattern
159159
160- error: Unnecessary nested match
160+ error: unnecessary nested match
161161 --> $DIR/collapsible_match.rs:92:22
162162 |
163163LL | Some(val) => match val {
@@ -167,11 +167,11 @@ LL | | _ => return,
167167LL | | },
168168 | |_________^
169169 |
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
171171 --> $DIR/collapsible_match.rs:92:14
172172 |
173173LL | Some(val) => match val {
174- | ^^^ Replace this binding
174+ | ^^^ replace this binding
175175LL | Some(n) => foo(n),
176176 | ^^^^^^^ with this pattern
177177
0 commit comments