mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
3ca67910a8
Cleaning the empty lines for clarity.
39 lines
1.5 KiB
Text
39 lines
1.5 KiB
Text
error: redundant pattern matching, consider using `is_ok()`
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:9:12
|
|
|
|
|
9 | if let Ok(_) = Ok::<i32, i32>(42) {}
|
|
| -------^^^^^--------------------- help: try this `if Ok::<i32, i32>(42).is_ok()`
|
|
|
|
|
= note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
|
|
note: lint level defined here
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:4:9
|
|
|
|
|
4 | #![deny(clippy)]
|
|
| ^^^^^^
|
|
|
|
error: redundant pattern matching, consider using `is_err()`
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:11:12
|
|
|
|
|
11 | if let Err(_) = Err::<i32, i32>(42) {
|
|
| -------^^^^^^---------------------- help: try this `if Err::<i32, i32>(42).is_err()`
|
|
|
|
|
= note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
|
|
|
|
error: redundant pattern matching, consider using `is_none()`
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:14:12
|
|
|
|
|
14 | if let None = None::<()> {
|
|
| -------^^^^------------- help: try this `if None::<()>.is_none()`
|
|
|
|
|
= note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
|
|
|
|
error: redundant pattern matching, consider using `is_some()`
|
|
--> $DIR/if_let_redundant_pattern_matching.rs:17:12
|
|
|
|
|
17 | if let Some(_) = Some(42) {
|
|
| -------^^^^^^^----------- help: try this `if Some(42).is_some()`
|
|
|
|
|
= note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
|
|
|
|
error: aborting due to 4 previous errors
|
|
|