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/complex_conditionals.rs:8:9
4 LL | if x.is_ok() && y.is_err() {
5 | --------- the check is happening here
6 LL | x.unwrap(); // unnecessary
9 note: the lint level is defined here
10 --> $DIR/complex_conditionals.rs:1:35
12 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: This call to `unwrap_err()` will always panic.
16 --> $DIR/complex_conditionals.rs:9:9
18 LL | if x.is_ok() && y.is_err() {
19 | --------- because of this check
20 LL | x.unwrap(); // unnecessary
21 LL | x.unwrap_err(); // will panic
24 note: the lint level is defined here
25 --> $DIR/complex_conditionals.rs:1:9
27 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28 | ^^^^^^^^^^^^^^^^^^^^^^^^
30 error: This call to `unwrap()` will always panic.
31 --> $DIR/complex_conditionals.rs:10:9
33 LL | if x.is_ok() && y.is_err() {
34 | ---------- because of this check
36 LL | y.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:11:9
42 LL | if x.is_ok() && y.is_err() {
43 | ---------- the check is happening here
45 LL | y.unwrap_err(); // unnecessary
48 error: This call to `unwrap()` will always panic.
49 --> $DIR/complex_conditionals.rs:25:9
51 LL | if x.is_ok() || y.is_ok() {
52 | --------- because of this check
54 LL | x.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:26:9
60 LL | if x.is_ok() || y.is_ok() {
61 | --------- the check is happening here
63 LL | x.unwrap_err(); // unnecessary
66 error: This call to `unwrap()` will always panic.
67 --> $DIR/complex_conditionals.rs:27:9
69 LL | if x.is_ok() || y.is_ok() {
70 | --------- because of this check
72 LL | y.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:28:9
78 LL | if x.is_ok() || y.is_ok() {
79 | --------- the check is happening here
81 LL | y.unwrap_err(); // unnecessary
84 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
85 --> $DIR/complex_conditionals.rs:32:9
87 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
88 | --------- the check is happening here
89 LL | x.unwrap(); // unnecessary
92 error: This call to `unwrap_err()` will always panic.
93 --> $DIR/complex_conditionals.rs:33:9
95 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
96 | --------- because of this check
97 LL | x.unwrap(); // unnecessary
98 LL | x.unwrap_err(); // will panic
101 error: This call to `unwrap()` will always panic.
102 --> $DIR/complex_conditionals.rs:34:9
104 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
105 | --------- because of this check
107 LL | y.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:35:9
113 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
114 | --------- the check is happening here
116 LL | y.unwrap_err(); // unnecessary
119 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
120 --> $DIR/complex_conditionals.rs:36:9
122 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
123 | ---------- the check is happening here
125 LL | z.unwrap(); // unnecessary
128 error: This call to `unwrap_err()` will always panic.
129 --> $DIR/complex_conditionals.rs:37:9
131 LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
132 | ---------- because of this check
134 LL | z.unwrap_err(); // will panic
137 error: This call to `unwrap()` will always panic.
138 --> $DIR/complex_conditionals.rs:45:9
140 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
141 | --------- because of this check
143 LL | x.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:46:9
149 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
150 | --------- the check is happening here
152 LL | x.unwrap_err(); // unnecessary
155 error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`.
156 --> $DIR/complex_conditionals.rs:47:9
158 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
159 | --------- the check is happening here
161 LL | y.unwrap(); // unnecessary
164 error: This call to `unwrap_err()` will always panic.
165 --> $DIR/complex_conditionals.rs:48:9
167 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
168 | --------- because of this check
170 LL | y.unwrap_err(); // will panic
173 error: This call to `unwrap()` will always panic.
174 --> $DIR/complex_conditionals.rs:49:9
176 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
177 | ---------- because of this check
179 LL | z.unwrap(); // will panic
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 --> $DIR/complex_conditionals.rs:50:9
185 LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
186 | ---------- the check is happening here
188 LL | z.unwrap_err(); // unnecessary
191 error: aborting due to 20 previous errors