2020-06-23 10:05:22 -05:00
|
|
|
error: redundant pattern matching, consider using `is_ok()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:10:12
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | if let Ok(_) = Ok::<i32, i32>(42) {}
|
|
|
|
| -------^^^^^--------------------- help: try this: `if Ok::<i32, i32>(42).is_ok()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_err()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:12:12
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | if let Err(_) = Err::<i32, i32>(42) {}
|
|
|
|
| -------^^^^^^---------------------- help: try this: `if Err::<i32, i32>(42).is_err()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ok()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:14:15
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | while let Ok(_) = Ok::<i32, i32>(10) {}
|
|
|
|
| ----------^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_ok()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_err()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:16:15
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | while let Err(_) = Ok::<i32, i32>(10) {}
|
|
|
|
| ----------^^^^^^--------------------- help: try this: `while Ok::<i32, i32>(10).is_err()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_ok()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:18:5
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | / match Ok::<i32, i32>(42) {
|
|
|
|
LL | | Ok(_) => true,
|
|
|
|
LL | | Err(_) => false,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `Ok::<i32, i32>(42).is_ok()`
|
|
|
|
|
|
|
|
error: redundant pattern matching, consider using `is_err()`
|
2020-06-25 19:43:48 -05:00
|
|
|
--> $DIR/redundant_pattern_matching_const_result.rs:23:5
|
2020-06-23 10:05:22 -05:00
|
|
|
|
|
|
|
|
LL | / match Err::<i32, i32>(42) {
|
|
|
|
LL | | Ok(_) => false,
|
|
|
|
LL | | Err(_) => true,
|
|
|
|
LL | | };
|
|
|
|
| |_____^ help: try this: `Err::<i32, i32>(42).is_err()`
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|