]> git.lizzy.rs Git - rust.git/commitdiff
clean tests/ui/if_let_redundant_pattern_matching.rs
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Thu, 11 May 2017 11:31:44 +0000 (12:31 +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/if_let_redundant_pattern_matching.rs
tests/ui/if_let_redundant_pattern_matching.stderr

index c48518304e2a3ee912cc88be8ce2f0836e053331..8ba2e1c5ff7cd7a0570441942ad00bc49f868c4c 100644 (file)
@@ -8,46 +8,28 @@
 fn main() {
     if let Ok(_) = Ok::<i32, i32>(42) {}
 
-
-
-
     if let Err(_) = Err::<i32, i32>(42) {
-
-
-
     }
 
     if let None = None::<()> {
-
-
-
     }
 
     if let Some(_) = Some(42) {
-
-
-
     }
 
     if Ok::<i32, i32>(42).is_ok() {
-
     }
 
     if Err::<i32, i32>(42).is_err() {
-
     }
 
     if None::<i32>.is_none() {
-
     }
 
     if Some(42).is_some() {
-
     }
 
     if let Ok(x) = Ok::<i32,i32>(42) {
         println!("{}", x);
     }
 }
-
-
index 198a19740652e4a3d02714612125791fa400a5a4..a5dddf05ec42318165db0fc2dc7c30454189d3e9 100644 (file)
@@ -12,25 +12,25 @@ note: lint level defined here
   |         ^^^^^^
 
 error: redundant pattern matching, consider using `is_err()`
-  --> $DIR/if_let_redundant_pattern_matching.rs:14:12
+  --> $DIR/if_let_redundant_pattern_matching.rs:11:12
    |
-14 |     if let Err(_) = Err::<i32, i32>(42) {
+11 |     if let Err(_) = Err::<i32, i32>(42) {
    |     -------^^^^^^---------------------- help: try this `if Err::<i32, i32>(42).is_err()`
    |
    = note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
 
 error: redundant pattern matching, consider using `is_none()`
-  --> $DIR/if_let_redundant_pattern_matching.rs:20:12
+  --> $DIR/if_let_redundant_pattern_matching.rs:14:12
    |
-20 |     if let None = None::<()> {
+14 |     if let None = None::<()> {
    |     -------^^^^------------- help: try this `if None::<()>.is_none()`
    |
    = note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]
 
 error: redundant pattern matching, consider using `is_some()`
-  --> $DIR/if_let_redundant_pattern_matching.rs:26:12
+  --> $DIR/if_let_redundant_pattern_matching.rs:17:12
    |
-26 |     if let Some(_) = Some(42) {
+17 |     if let Some(_) = Some(42) {
    |     -------^^^^^^^----------- help: try this `if Some(42).is_some()`
    |
    = note: #[deny(if_let_redundant_pattern_matching)] implied by #[deny(clippy)]