]> git.lizzy.rs Git - rust.git/commitdiff
clean tests/ui/ok_if_let.rs
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Thu, 11 May 2017 14:30:21 +0000 (15:30 +0100)
committerLuis de Bethencourt <luisbg@osg.samsung.com>
Thu, 11 May 2017 15:22:32 +0000 (16:22 +0100)
Cleaning the empty lines for clarity.

tests/ui/ok_if_let.rs
tests/ui/ok_if_let.stderr

index fdde6303b0849b5682734dca99cad566af48b038..e8a55a552d4e1de3fc1826fd837c21350e33ebdf 100644 (file)
@@ -5,7 +5,6 @@
 
 fn str_to_int(x: &str) -> i32 {
     if let Some(y) = x.parse().ok() {
-
         y
     } else {
         0
index 42f60d4097d8b2982a8398abbbd84b7af6b12cc3..bf58e1281cf2a83d9734d6385f00a46ee45f2482 100644 (file)
@@ -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