This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ impl<'tcx> LateLintPass<'tcx> for OkIfLet {
61
61
cx,
62
62
IF_LET_SOME_RESULT ,
63
63
expr. span. with_hi( op. span. hi( ) ) ,
64
- "Matching on `Some` with `ok()` is redundant" ,
65
- & format!( "Consider matching on `Ok({})` and removing the call to `ok` instead" , some_expr_string) ,
64
+ "matching on `Some` with `ok()` is redundant" ,
65
+ & format!( "consider matching on `Ok({})` and removing the call to `ok` instead" , some_expr_string) ,
66
66
sugg,
67
67
applicability,
68
68
) ;
Original file line number Diff line number Diff line change 1
- error: Matching on `Some` with `ok()` is redundant
1
+ error: matching on `Some` with `ok()` is redundant
2
2
--> $DIR/if_let_some_result.rs:6:5
3
3
|
4
4
LL | if let Some(y) = x.parse().ok() {
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6
6
|
7
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
8
+ help: consider matching on `Ok(y)` and removing the call to `ok` instead
9
9
|
10
10
LL | if let Ok(y) = x.parse() {
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^
12
12
13
- error: Matching on `Some` with `ok()` is redundant
13
+ error: matching on `Some` with `ok()` is redundant
14
14
--> $DIR/if_let_some_result.rs:24:9
15
15
|
16
16
LL | if let Some(y) = x . parse() . ok () {
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
|
19
- help: Consider matching on `Ok(y)` and removing the call to `ok` instead
19
+ help: consider matching on `Ok(y)` and removing the call to `ok` instead
20
20
|
21
21
LL | if let Ok(y) = x . parse() {
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments