]> git.lizzy.rs Git - rust.git/blob - tests/ui/if_let_some_result.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / if_let_some_result.stderr
1 error: Matching on `Some` with `ok()` is redundant
2   --> $DIR/if_let_some_result.rs:6:5
3    |
4 LL |     if let Some(y) = x.parse().ok() {
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
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
9    |
10 LL |     if let Ok(y) = x.parse() {
11    |     ^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: Matching on `Some` with `ok()` is redundant
14   --> $DIR/if_let_some_result.rs:24:9
15    |
16 LL |         if let Some(y) = x   .   parse()   .   ok   ()    {
17    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18    |
19 help: Consider matching on `Ok(y)` and removing the call to `ok` instead
20    |
21 LL |         if let Ok(y) = x   .   parse()       {
22    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
24 error: aborting due to 2 previous errors
25