fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: you should use the `starts_with` method 2 --> $DIR/starts_ends_with.rs:7:5 3 | 4LL | "".chars().next() == Some(' '); 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')` 6 | 7 = note: `-D clippy::chars-next-cmp` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::chars_next_cmp)]` 9 10error: you should use the `starts_with` method 11 --> $DIR/starts_ends_with.rs:8:5 12 | 13LL | Some(' ') != "".chars().next(); 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')` 15 16error: you should use the `starts_with` method 17 --> $DIR/starts_ends_with.rs:11:5 18 | 19LL | "".chars().next() == Some('\n'); 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with('\n')` 21 22error: you should use the `starts_with` method 23 --> $DIR/starts_ends_with.rs:12:5 24 | 25LL | Some('\n') != "".chars().next(); 26 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with('\n')` 27 28error: you should use the `starts_with` method 29 --> $DIR/starts_ends_with.rs:17:8 30 | 31LL | if s.chars().next().unwrap() == 'f' { 32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')` 33 34error: you should use the `ends_with` method 35 --> $DIR/starts_ends_with.rs:21:8 36 | 37LL | if s.chars().next_back().unwrap() == 'o' { 38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')` 39 | 40 = note: `-D clippy::chars-last-cmp` implied by `-D warnings` 41 = help: to override `-D warnings` add `#[allow(clippy::chars_last_cmp)]` 42 43error: you should use the `ends_with` method 44 --> $DIR/starts_ends_with.rs:25:8 45 | 46LL | if s.chars().last().unwrap() == 'o' { 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')` 48 49error: you should use the `starts_with` method 50 --> $DIR/starts_ends_with.rs:29:8 51 | 52LL | if s.chars().next().unwrap() != 'f' { 53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')` 54 55error: you should use the `ends_with` method 56 --> $DIR/starts_ends_with.rs:33:8 57 | 58LL | if s.chars().next_back().unwrap() != 'o' { 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')` 60 61error: you should use the `ends_with` method 62 --> $DIR/starts_ends_with.rs:37:8 63 | 64LL | if s.chars().last().unwrap() != '\n' { 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('\n')` 66 67error: you should use the `ends_with` method 68 --> $DIR/starts_ends_with.rs:45:5 69 | 70LL | "".chars().last() == Some(' '); 71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')` 72 73error: you should use the `ends_with` method 74 --> $DIR/starts_ends_with.rs:46:5 75 | 76LL | Some(' ') != "".chars().last(); 77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')` 78 79error: you should use the `ends_with` method 80 --> $DIR/starts_ends_with.rs:47:5 81 | 82LL | "".chars().next_back() == Some(' '); 83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')` 84 85error: you should use the `ends_with` method 86 --> $DIR/starts_ends_with.rs:48:5 87 | 88LL | Some(' ') != "".chars().next_back(); 89 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')` 90 91error: you should use the `ends_with` method 92 --> $DIR/starts_ends_with.rs:51:5 93 | 94LL | "".chars().last() == Some('\n'); 95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with('\n')` 96 97error: you should use the `ends_with` method 98 --> $DIR/starts_ends_with.rs:52:5 99 | 100LL | Some('\n') != "".chars().last(); 101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with('\n')` 102 103error: aborting due to 16 previous errors 104