1 error: matching on `Some` with `ok()` is redundant
2 --> $DIR/match_result_ok.rs:10:5
4 LL | if let Some(y) = x.parse().ok() { y } else { 0 }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::match-result-ok` implied by `-D warnings`
8 help: consider matching on `Ok(y)` and removing the call to `ok` instead
10 LL | if let Ok(y) = x.parse() { y } else { 0 }
11 | ~~~~~~~~~~~~~~~~~~~~~~~~
13 error: matching on `Some` with `ok()` is redundant
14 --> $DIR/match_result_ok.rs:20:9
16 LL | if let Some(y) = x . parse() . ok () {
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 help: consider matching on `Ok(y)` and removing the call to `ok` instead
21 LL | if let Ok(y) = x . parse() {
22 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 error: matching on `Some` with `ok()` is redundant
25 --> $DIR/match_result_ok.rs:46:5
27 LL | while let Some(a) = wat.next().ok() {
28 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 help: consider matching on `Ok(a)` and removing the call to `ok` instead
32 LL | while let Ok(a) = wat.next() {
33 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35 error: aborting due to 3 previous errors