1
- error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
1
+ error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
2
2
--> $DIR/complex_conditionals.rs:8:9
3
3
|
4
4
LL | if x.is_ok() && y.is_err() {
@@ -12,7 +12,7 @@ note: the lint level is defined here
12
12
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
15
- error: This call to `unwrap_err()` will always panic.
15
+ error: this call to `unwrap_err()` will always panic
16
16
--> $DIR/complex_conditionals.rs:9:9
17
17
|
18
18
LL | if x.is_ok() && y.is_err() {
@@ -27,7 +27,7 @@ note: the lint level is defined here
27
27
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28
28
| ^^^^^^^^^^^^^^^^^^^^^^^^
29
29
30
- error: This call to `unwrap()` will always panic.
30
+ error: this call to `unwrap()` will always panic
31
31
--> $DIR/complex_conditionals.rs:10:9
32
32
|
33
33
LL | if x.is_ok() && y.is_err() {
@@ -36,7 +36,7 @@ LL | if x.is_ok() && y.is_err() {
36
36
LL | y.unwrap(); // will panic
37
37
| ^^^^^^^^^^
38
38
39
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
39
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
40
40
--> $DIR/complex_conditionals.rs:11:9
41
41
|
42
42
LL | if x.is_ok() && y.is_err() {
@@ -45,7 +45,7 @@ LL | if x.is_ok() && y.is_err() {
45
45
LL | y.unwrap_err(); // unnecessary
46
46
| ^^^^^^^^^^^^^^
47
47
48
- error: This call to `unwrap()` will always panic.
48
+ error: this call to `unwrap()` will always panic
49
49
--> $DIR/complex_conditionals.rs:25:9
50
50
|
51
51
LL | if x.is_ok() || y.is_ok() {
@@ -54,7 +54,7 @@ LL | if x.is_ok() || y.is_ok() {
54
54
LL | x.unwrap(); // will panic
55
55
| ^^^^^^^^^^
56
56
57
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
57
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
58
58
--> $DIR/complex_conditionals.rs:26:9
59
59
|
60
60
LL | if x.is_ok() || y.is_ok() {
@@ -63,7 +63,7 @@ LL | if x.is_ok() || y.is_ok() {
63
63
LL | x.unwrap_err(); // unnecessary
64
64
| ^^^^^^^^^^^^^^
65
65
66
- error: This call to `unwrap()` will always panic.
66
+ error: this call to `unwrap()` will always panic
67
67
--> $DIR/complex_conditionals.rs:27:9
68
68
|
69
69
LL | if x.is_ok() || y.is_ok() {
@@ -72,7 +72,7 @@ LL | if x.is_ok() || y.is_ok() {
72
72
LL | y.unwrap(); // will panic
73
73
| ^^^^^^^^^^
74
74
75
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
75
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
76
76
--> $DIR/complex_conditionals.rs:28:9
77
77
|
78
78
LL | if x.is_ok() || y.is_ok() {
@@ -81,15 +81,15 @@ LL | if x.is_ok() || y.is_ok() {
81
81
LL | y.unwrap_err(); // unnecessary
82
82
| ^^^^^^^^^^^^^^
83
83
84
- error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
84
+ error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
85
85
--> $DIR/complex_conditionals.rs:32:9
86
86
|
87
87
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
88
88
| --------- the check is happening here
89
89
LL | x.unwrap(); // unnecessary
90
90
| ^^^^^^^^^^
91
91
92
- error: This call to `unwrap_err()` will always panic.
92
+ error: this call to `unwrap_err()` will always panic
93
93
--> $DIR/complex_conditionals.rs:33:9
94
94
|
95
95
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
@@ -98,7 +98,7 @@ LL | x.unwrap(); // unnecessary
98
98
LL | x.unwrap_err(); // will panic
99
99
| ^^^^^^^^^^^^^^
100
100
101
- error: This call to `unwrap()` will always panic.
101
+ error: this call to `unwrap()` will always panic
102
102
--> $DIR/complex_conditionals.rs:34:9
103
103
|
104
104
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
@@ -107,7 +107,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
107
107
LL | y.unwrap(); // will panic
108
108
| ^^^^^^^^^^
109
109
110
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
110
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
111
111
--> $DIR/complex_conditionals.rs:35:9
112
112
|
113
113
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
@@ -116,7 +116,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
116
116
LL | y.unwrap_err(); // unnecessary
117
117
| ^^^^^^^^^^^^^^
118
118
119
- error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
119
+ error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
120
120
--> $DIR/complex_conditionals.rs:36:9
121
121
|
122
122
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
@@ -125,7 +125,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
125
125
LL | z.unwrap(); // unnecessary
126
126
| ^^^^^^^^^^
127
127
128
- error: This call to `unwrap_err()` will always panic.
128
+ error: this call to `unwrap_err()` will always panic
129
129
--> $DIR/complex_conditionals.rs:37:9
130
130
|
131
131
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
@@ -134,7 +134,7 @@ LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
134
134
LL | z.unwrap_err(); // will panic
135
135
| ^^^^^^^^^^^^^^
136
136
137
- error: This call to `unwrap()` will always panic.
137
+ error: this call to `unwrap()` will always panic
138
138
--> $DIR/complex_conditionals.rs:45:9
139
139
|
140
140
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
@@ -143,7 +143,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
143
143
LL | x.unwrap(); // will panic
144
144
| ^^^^^^^^^^
145
145
146
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
146
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
147
147
--> $DIR/complex_conditionals.rs:46:9
148
148
|
149
149
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
@@ -152,7 +152,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
152
152
LL | x.unwrap_err(); // unnecessary
153
153
| ^^^^^^^^^^^^^^
154
154
155
- error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
155
+ error: you checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
156
156
--> $DIR/complex_conditionals.rs:47:9
157
157
|
158
158
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
@@ -161,7 +161,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
161
161
LL | y.unwrap(); // unnecessary
162
162
| ^^^^^^^^^^
163
163
164
- error: This call to `unwrap_err()` will always panic.
164
+ error: this call to `unwrap_err()` will always panic
165
165
--> $DIR/complex_conditionals.rs:48:9
166
166
|
167
167
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
@@ -170,7 +170,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
170
170
LL | y.unwrap_err(); // will panic
171
171
| ^^^^^^^^^^^^^^
172
172
173
- error: This call to `unwrap()` will always panic.
173
+ error: this call to `unwrap()` will always panic
174
174
--> $DIR/complex_conditionals.rs:49:9
175
175
|
176
176
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
@@ -179,7 +179,7 @@ LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
179
179
LL | z.unwrap(); // will panic
180
180
| ^^^^^^^^^^
181
181
182
- error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
182
+ error: you checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`
183
183
--> $DIR/complex_conditionals.rs:50:9
184
184
|
185
185
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
0 commit comments