1 error: matching on `Some` with `ok()` is redundant
2 --> $DIR/if_let_some_result.rs:7:5
4 LL | if let Some(y) = x.parse().ok() { y } else { 0 }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::if-let-some-result` 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/if_let_some_result.rs:17: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: aborting due to 2 previous errors