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

index d8f923bcaa9887c311cd55f524d10d1f6caac3e6..4940ef4684fd20ccc8e8512a18bf73a13143785f 100644 (file)
@@ -128,16 +128,10 @@ pub fn is_empty(self: &Self, x : u32) -> bool {
 fn main() {
     let x = [1, 2];
     if x.len() == 0 {
-
-
-
         println!("This should not happen!");
     }
 
     if "".len() == 0 {
-
-
-
     }
 
     let y = One;
@@ -152,30 +146,18 @@ fn main() {
 
     let has_is_empty = HasIsEmpty;
     if has_is_empty.len() == 0 {
-
-
-
         println!("Or this!");
     }
     if has_is_empty.len() != 0 {
-
-
-
         println!("Or this!");
     }
     if has_is_empty.len() > 0 {
-
-
-
         println!("Or this!");
     }
     assert!(!has_is_empty.is_empty());
 
     let with_is_empty: &WithIsEmpty = &Wither;
     if with_is_empty.len() == 0 {
-
-
-
         println!("Or this!");
     }
     assert!(!with_is_empty.is_empty());
index 27fa35e6c036bf7cf98e739346b655d394eba8d0..891f1741aa749438519aeb3aa5aeff41caee72cd 100644 (file)
@@ -59,39 +59,39 @@ note: lint level defined here
     |                               ^^^^^^^^
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:137:8
+   --> $DIR/len_zero.rs:134:8
     |
-137 |     if "".len() == 0 {
+134 |     if "".len() == 0 {
     |        ^^^^^^^^^^^^^ help: using `is_empty` is more concise: `"".is_empty()`
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:154:8
+   --> $DIR/len_zero.rs:148:8
     |
-154 |     if has_is_empty.len() == 0 {
+148 |     if has_is_empty.len() == 0 {
     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `has_is_empty.is_empty()`
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:160:8
+   --> $DIR/len_zero.rs:151:8
     |
-160 |     if has_is_empty.len() != 0 {
+151 |     if has_is_empty.len() != 0 {
     |        ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:166:8
+   --> $DIR/len_zero.rs:154:8
     |
-166 |     if has_is_empty.len() > 0 {
+154 |     if has_is_empty.len() > 0 {
     |        ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `!has_is_empty.is_empty()`
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:175:8
+   --> $DIR/len_zero.rs:160:8
     |
-175 |     if with_is_empty.len() == 0 {
+160 |     if with_is_empty.len() == 0 {
     |        ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is more concise: `with_is_empty.is_empty()`
 
 error: length comparison to zero
-   --> $DIR/len_zero.rs:190:8
+   --> $DIR/len_zero.rs:172:8
     |
-190 |     if b.len() != 0 {
+172 |     if b.len() != 0 {
     |        ^^^^^^^^^^^^ help: using `is_empty` is more concise: `!b.is_empty()`
 
 error: aborting due to 11 previous errors