2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap` on `x` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:12:9
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2019-07-15 14:27:44 -05:00
|
|
|
LL | if x.is_ok() && y.is_err() {
|
|
|
|
| --------- the check is happening here
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // unnecessary
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2022-09-22 11:04:22 -05:00
|
|
|
= help: try using `if let` or `match`
|
2020-01-31 13:21:10 -06:00
|
|
|
note: the lint level is defined here
|
2019-07-15 14:27:44 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:1:35
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap_err()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:13:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2019-07-15 14:27:44 -05:00
|
|
|
LL | if x.is_ok() && y.is_err() {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // unnecessary
|
|
|
|
LL | x.unwrap_err(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2020-01-31 13:21:10 -06:00
|
|
|
note: the lint level is defined here
|
2019-07-15 14:27:44 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:1:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2019-07-15 14:27:44 -05:00
|
|
|
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-08 11:12:01 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:14:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && y.is_err() {
|
2018-06-08 11:12:01 -05:00
|
|
|
| ---------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap(); // will panic
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `y` after checking its variant with `is_err`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:15:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && y.is_err() {
|
2018-06-07 22:55:11 -05:00
|
|
|
| ---------- the check is happening here
|
2018-06-08 11:12:01 -05:00
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap_err(); // unnecessary
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:29:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || y.is_ok() {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `x` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:30:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || y.is_ok() {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap_err(); // unnecessary
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:31:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || y.is_ok() {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `y` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:32:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || y.is_ok() {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap_err(); // unnecessary
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap` on `x` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:36:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // unnecessary
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-06-08 11:12:01 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap_err()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:37:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // unnecessary
|
|
|
|
LL | x.unwrap_err(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:38:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap(); // will panic
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `y` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:39:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
2018-06-08 11:12:01 -05:00
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap_err(); // unnecessary
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap` on `z` after checking its variant with `is_err`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:40:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-07 22:55:11 -05:00
|
|
|
| ---------- the check is happening here
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | z.unwrap(); // unnecessary
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-06-08 11:12:01 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap_err()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:41:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() && !(y.is_ok() || z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| ---------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | z.unwrap_err(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:49:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap(); // will panic
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `x` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:50:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | x.unwrap_err(); // unnecessary
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap` on `y` after checking its variant with `is_ok`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:51:9
|
2018-05-27 17:02:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-06-07 22:55:11 -05:00
|
|
|
| --------- the check is happening here
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap(); // unnecessary
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-06-08 11:12:01 -05:00
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap_err()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:52:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| --------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | y.unwrap_err(); // will panic
|
2018-06-08 11:12:01 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2020-08-11 08:43:21 -05:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:53:9
|
2018-06-08 11:12:01 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-06-08 11:12:01 -05:00
|
|
|
| ---------- because of this check
|
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | z.unwrap(); // will panic
|
2018-05-27 17:02:38 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2021-09-08 09:31:47 -05:00
|
|
|
error: called `unwrap_err` on `z` after checking its variant with `is_err`
|
2023-05-31 12:47:10 -05:00
|
|
|
--> $DIR/complex_conditionals.rs:54:9
|
2018-12-09 23:27:19 -06:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | if x.is_ok() || !(y.is_ok() && z.is_err()) {
|
2018-12-09 23:27:19 -06:00
|
|
|
| ---------- the check is happening here
|
2018-06-07 22:55:11 -05:00
|
|
|
...
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | z.unwrap_err(); // unnecessary
|
2018-12-09 23:27:19 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
2021-09-08 09:31:47 -05:00
|
|
|
|
|
|
|
|
= help: try using `if let` or `match`
|
2018-05-27 17:02:38 -05:00
|
|
|
|
2020-03-18 09:24:48 -05:00
|
|
|
error: aborting due to 20 previous errors
|
2018-05-27 17:02:38 -05:00
|
|
|
|