fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB37 linesraw
1error: matching on `Some` with `ok()` is redundant
2  --> $DIR/match_result_ok.rs:8:5
3   |
4LL |     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: to override `-D warnings` add `#[allow(clippy::match_result_ok)]`
9help: consider matching on `Ok(y)` and removing the call to `ok` instead
10   |
11LL |     if let Ok(y) = x.parse() { y } else { 0 }
12   |     ~~~~~~~~~~~~~~~~~~~~~~~~
13
14error: matching on `Some` with `ok()` is redundant
15  --> $DIR/match_result_ok.rs:18:9
16   |
17LL |         if let Some(y) = x   .   parse()   .   ok   ()    {
18   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19   |
20help: consider matching on `Ok(y)` and removing the call to `ok` instead
21   |
22LL |         if let Ok(y) = x   .   parse()    {
23   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24
25error: matching on `Some` with `ok()` is redundant
26  --> $DIR/match_result_ok.rs:44:5
27   |
28LL |     while let Some(a) = wat.next().ok() {
29   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30   |
31help: consider matching on `Ok(a)` and removing the call to `ok` instead
32   |
33LL |     while let Ok(a) = wat.next() {
34   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
36error: aborting due to 3 previous errors
37