mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-26 22:05:14 +00:00
clean tests/ui/ok_if_let.rs
Cleaning the empty lines for clarity.
This commit is contained in:
parent
c9190f681d
commit
69139facb2
@ -5,7 +5,6 @@
|
||||
|
||||
fn str_to_int(x: &str) -> i32 {
|
||||
if let Some(y) = x.parse().ok() {
|
||||
|
||||
y
|
||||
} else {
|
||||
0
|
||||
|
@ -2,11 +2,10 @@ error: Matching on `Some` with `ok()` is redundant
|
||||
--> $DIR/ok_if_let.rs:7:5
|
||||
|
|
||||
7 | / if let Some(y) = x.parse().ok() {
|
||||
8 | |
|
||||
9 | | y
|
||||
10 | | } else {
|
||||
11 | | 0
|
||||
12 | | }
|
||||
8 | | y
|
||||
9 | | } else {
|
||||
10 | | 0
|
||||
11 | | }
|
||||
| |_____^
|
||||
|
|
||||
note: lint level defined here
|
||||
|
Loading…
Reference in New Issue
Block a user