1 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
2 --> $DIR/checked_unwrap.rs:7:9
5 | ----------- the check is happening here
6 LL | x.unwrap(); // unnecessary
9 note: lint level defined here
10 --> $DIR/checked_unwrap.rs:1:35
12 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: This call to `unwrap()` will always panic.
16 --> $DIR/checked_unwrap.rs:9:9
19 | ----------- because of this check
21 LL | x.unwrap(); // will panic
24 note: lint level defined here
25 --> $DIR/checked_unwrap.rs:1:9
27 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28 | ^^^^^^^^^^^^^^^^^^^^^^^^
30 error: This call to `unwrap()` will always panic.
31 --> $DIR/checked_unwrap.rs:12:9
34 | ----------- because of this check
35 LL | x.unwrap(); // will panic
38 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
39 --> $DIR/checked_unwrap.rs:14:9
42 | ----------- the check is happening here
44 LL | x.unwrap(); // unnecessary
47 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
48 --> $DIR/checked_unwrap.rs:18:9
51 | --------- the check is happening here
52 LL | x.unwrap(); // unnecessary
55 error: This call to `unwrap_err()` will always panic.
56 --> $DIR/checked_unwrap.rs:19:9
59 | --------- because of this check
60 LL | x.unwrap(); // unnecessary
61 LL | x.unwrap_err(); // will panic
64 error: This call to `unwrap()` will always panic.
65 --> $DIR/checked_unwrap.rs:21:9
68 | --------- because of this check
70 LL | x.unwrap(); // will panic
73 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
74 --> $DIR/checked_unwrap.rs:22:9
77 | --------- the check is happening here
79 LL | x.unwrap_err(); // unnecessary
82 error: This call to `unwrap()` will always panic.
83 --> $DIR/checked_unwrap.rs:25:9
86 | ---------- because of this check
87 LL | x.unwrap(); // will panic
90 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
91 --> $DIR/checked_unwrap.rs:26:9
94 | ---------- the check is happening here
95 LL | x.unwrap(); // will panic
96 LL | x.unwrap_err(); // unnecessary
99 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
100 --> $DIR/checked_unwrap.rs:28:9
103 | ---------- the check is happening here
105 LL | x.unwrap(); // unnecessary
108 error: This call to `unwrap_err()` will always panic.
109 --> $DIR/checked_unwrap.rs:29:9
112 | ---------- because of this check
114 LL | x.unwrap_err(); // will panic
117 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
118 --> $DIR/checked_unwrap.rs:46:9
120 LL | if x.is_ok() && y.is_err() {
121 | --------- the check is happening here
122 LL | x.unwrap(); // unnecessary
125 error: This call to `unwrap_err()` will always panic.
126 --> $DIR/checked_unwrap.rs:47:9
128 LL | if x.is_ok() && y.is_err() {
129 | --------- because of this check
130 LL | x.unwrap(); // unnecessary
131 LL | x.unwrap_err(); // will panic
134 error: This call to `unwrap()` will always panic.
135 --> $DIR/checked_unwrap.rs:48:9
137 LL | if x.is_ok() && y.is_err() {
138 | ---------- because of this check
140 LL | y.unwrap(); // will panic
143 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
144 --> $DIR/checked_unwrap.rs:49:9
146 LL | if x.is_ok() && y.is_err() {
147 | ---------- the check is happening here
149 LL | y.unwrap_err(); // unnecessary
152 error: This call to `unwrap()` will always panic.
153 --> $DIR/checked_unwrap.rs:63:9
155 LL | if x.is_ok() || y.is_ok() {
156 | --------- because of this check
158 LL | x.unwrap(); // will panic
161 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
162 --> $DIR/checked_unwrap.rs:64:9
164 LL | if x.is_ok() || y.is_ok() {
165 | --------- the check is happening here
167 LL | x.unwrap_err(); // unnecessary
170 error: This call to `unwrap()` will always panic.
171 --> $DIR/checked_unwrap.rs:65:9
173 LL | if x.is_ok() || y.is_ok() {
174 | --------- because of this check
176 LL | y.unwrap(); // will panic
179 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
180 --> $DIR/checked_unwrap.rs:66:9
182 LL | if x.is_ok() || y.is_ok() {
183 | --------- the check is happening here
185 LL | y.unwrap_err(); // unnecessary
188 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
189 --> $DIR/checked_unwrap.rs:70:9
191 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
192 | --------- the check is happening here
193 LL | x.unwrap(); // unnecessary
196 error: This call to `unwrap_err()` will always panic.
197 --> $DIR/checked_unwrap.rs:71:9
199 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
200 | --------- because of this check
201 LL | x.unwrap(); // unnecessary
202 LL | x.unwrap_err(); // will panic
205 error: This call to `unwrap()` will always panic.
206 --> $DIR/checked_unwrap.rs:72:9
208 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
209 | --------- because of this check
211 LL | y.unwrap(); // will panic
214 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
215 --> $DIR/checked_unwrap.rs:73:9
217 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
218 | --------- the check is happening here
220 LL | y.unwrap_err(); // unnecessary
223 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
224 --> $DIR/checked_unwrap.rs:74:9
226 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
227 | ---------- the check is happening here
229 LL | z.unwrap(); // unnecessary
232 error: This call to `unwrap_err()` will always panic.
233 --> $DIR/checked_unwrap.rs:75:9
235 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
236 | ---------- because of this check
238 LL | z.unwrap_err(); // will panic
241 error: This call to `unwrap()` will always panic.
242 --> $DIR/checked_unwrap.rs:83:9
244 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
245 | --------- because of this check
247 LL | x.unwrap(); // will panic
250 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
251 --> $DIR/checked_unwrap.rs:84:9
253 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
254 | --------- the check is happening here
256 LL | x.unwrap_err(); // unnecessary
259 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
260 --> $DIR/checked_unwrap.rs:85:9
262 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
263 | --------- the check is happening here
265 LL | y.unwrap(); // unnecessary
268 error: This call to `unwrap_err()` will always panic.
269 --> $DIR/checked_unwrap.rs:86:9
271 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
272 | --------- because of this check
274 LL | y.unwrap_err(); // will panic
277 error: This call to `unwrap()` will always panic.
278 --> $DIR/checked_unwrap.rs:87:9
280 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
281 | ---------- because of this check
283 LL | z.unwrap(); // will panic
286 error: You checked before that `unwrap_err()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
287 --> $DIR/checked_unwrap.rs:88:9
289 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
290 | ---------- the check is happening here
292 LL | z.unwrap_err(); // unnecessary
295 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
296 --> $DIR/checked_unwrap.rs:96:13
298 LL | if x.is_some() {
299 | ----------- the check is happening here
300 LL | x.unwrap(); // unnecessary
303 error: This call to `unwrap()` will always panic.
304 --> $DIR/checked_unwrap.rs:98:13
306 LL | if x.is_some() {
307 | ----------- because of this check
309 LL | x.unwrap(); // will panic
312 error: aborting due to 34 previous errors