]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/match_result_ok.stderr
Rollup merge of #100076 - tspiteri:const_slice_split_at, r=oli-obk
[rust.git] / src / tools / clippy / tests / ui / match_result_ok.stderr
1 error: matching on `Some` with `ok()` is redundant
2   --> $DIR/match_result_ok.rs:10:5
3    |
4 LL |     if let Some(y) = x.parse().ok() { y } else { 0 }
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
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
9    |
10 LL |     if let Ok(y) = x.parse() { y } else { 0 }
11    |     ~~~~~~~~~~~~~~~~~~~~~~~~
12
13 error: matching on `Some` with `ok()` is redundant
14   --> $DIR/match_result_ok.rs:20: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: matching on `Some` with `ok()` is redundant
25   --> $DIR/match_result_ok.rs:46:5
26    |
27 LL |     while let Some(a) = wat.next().ok() {
28    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29    |
30 help: consider matching on `Ok(a)` and removing the call to `ok` instead
31    |
32 LL |     while let Ok(a) = wat.next() {
33    |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
35 error: aborting due to 3 previous errors
36