fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: length comparison to zero 2 --> $DIR/len_zero.rs:82:8 3 | 4LL | if x.len() == 0 { 5 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `x.is_empty()` 6 | 7 = note: `-D clippy::len-zero` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::len_zero)]` 9 10error: length comparison to zero 11 --> $DIR/len_zero.rs:86:8 12 | 13LL | if "".len() == 0 {} 14 | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `"".is_empty()` 15 16error: comparison to empty slice 17 --> $DIR/len_zero.rs:95:20 18 | 19LL | println!("{}", *s1 == ""); 20 | ^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s1.is_empty()` 21 | 22 = note: `-D clippy::comparison-to-empty` implied by `-D warnings` 23 = help: to override `-D warnings` add `#[allow(clippy::comparison_to_empty)]` 24 25error: comparison to empty slice 26 --> $DIR/len_zero.rs:96:20 27 | 28LL | println!("{}", **s2 == ""); 29 | ^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s2.is_empty()` 30 31error: comparison to empty slice 32 --> $DIR/len_zero.rs:97:20 33 | 34LL | println!("{}", ***s3 == ""); 35 | ^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s3.is_empty()` 36 37error: comparison to empty slice 38 --> $DIR/len_zero.rs:98:20 39 | 40LL | println!("{}", ****s4 == ""); 41 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s4.is_empty()` 42 43error: comparison to empty slice 44 --> $DIR/len_zero.rs:99:20 45 | 46LL | println!("{}", *****s5 == ""); 47 | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `s5.is_empty()` 48 49error: comparison to empty slice 50 --> $DIR/len_zero.rs:100:20 51 | 52LL | println!("{}", ******(s6) == ""); 53 | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(s6).is_empty()` 54 55error: comparison to empty slice 56 --> $DIR/len_zero.rs:103:20 57 | 58LL | println!("{}", &**d2s == ""); 59 | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `(**d2s).is_empty()` 60 61error: length comparison to zero 62 --> $DIR/len_zero.rs:118:8 63 | 64LL | if has_is_empty.len() == 0 { 65 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()` 66 67error: length comparison to zero 68 --> $DIR/len_zero.rs:121:8 69 | 70LL | if has_is_empty.len() != 0 { 71 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 72 73error: length comparison to zero 74 --> $DIR/len_zero.rs:124:8 75 | 76LL | if has_is_empty.len() > 0 { 77 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 78 79error: length comparison to one 80 --> $DIR/len_zero.rs:127:8 81 | 82LL | if has_is_empty.len() < 1 { 83 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()` 84 85error: length comparison to one 86 --> $DIR/len_zero.rs:130:8 87 | 88LL | if has_is_empty.len() >= 1 { 89 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 90 91error: length comparison to zero 92 --> $DIR/len_zero.rs:141:8 93 | 94LL | if 0 == has_is_empty.len() { 95 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()` 96 97error: length comparison to zero 98 --> $DIR/len_zero.rs:144:8 99 | 100LL | if 0 != has_is_empty.len() { 101 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 102 103error: length comparison to zero 104 --> $DIR/len_zero.rs:147:8 105 | 106LL | if 0 < has_is_empty.len() { 107 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 108 109error: length comparison to one 110 --> $DIR/len_zero.rs:150:8 111 | 112LL | if 1 <= has_is_empty.len() { 113 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 114 115error: length comparison to one 116 --> $DIR/len_zero.rs:153:8 117 | 118LL | if 1 > has_is_empty.len() { 119 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()` 120 121error: length comparison to zero 122 --> $DIR/len_zero.rs:167:8 123 | 124LL | if with_is_empty.len() == 0 { 125 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `with_is_empty.is_empty()` 126 127error: length comparison to zero 128 --> $DIR/len_zero.rs:179:6 129 | 130LL | (has_is_empty.len() > 0).then(|| println!("This can happen.")); 131 | ^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!has_is_empty.is_empty()` 132 133error: length comparison to zero 134 --> $DIR/len_zero.rs:180:6 135 | 136LL | (has_is_empty.len() == 0).then(|| println!("Or this!")); 137 | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `has_is_empty.is_empty()` 138 139error: length comparison to zero 140 --> $DIR/len_zero.rs:184:8 141 | 142LL | if b.len() != 0 {} 143 | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!b.is_empty()` 144 145error: aborting due to 23 previous errors 146