@@ -13,66 +13,90 @@ LL | Some(' ') != "".chars().next();
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
1414
1515error: you should use the `starts_with` method
16- --> $DIR/starts_ends_with.rs:14:8
16+ --> $DIR/starts_ends_with.rs:12:5
17+ |
18+ LL | "".chars().next() == Some('/n');
19+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with('/n')`
20+
21+ error: you should use the `starts_with` method
22+ --> $DIR/starts_ends_with.rs:13:5
23+ |
24+ LL | Some('/n') != "".chars().next();
25+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with('/n')`
26+
27+ error: you should use the `starts_with` method
28+ --> $DIR/starts_ends_with.rs:18:8
1729 |
1830LL | if s.chars().next().unwrap() == 'f' {
1931 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
2032
2133error: you should use the `ends_with` method
22- --> $DIR/starts_ends_with.rs:18 :8
34+ --> $DIR/starts_ends_with.rs:22 :8
2335 |
2436LL | if s.chars().next_back().unwrap() == 'o' {
2537 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
2638 |
2739 = note: `-D clippy::chars-last-cmp` implied by `-D warnings`
2840
2941error: you should use the `ends_with` method
30- --> $DIR/starts_ends_with.rs:22 :8
42+ --> $DIR/starts_ends_with.rs:26 :8
3143 |
3244LL | if s.chars().last().unwrap() == 'o' {
3345 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
3446
3547error: you should use the `starts_with` method
36- --> $DIR/starts_ends_with.rs:26 :8
48+ --> $DIR/starts_ends_with.rs:30 :8
3749 |
3850LL | if s.chars().next().unwrap() != 'f' {
3951 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
4052
4153error: you should use the `ends_with` method
42- --> $DIR/starts_ends_with.rs:30 :8
54+ --> $DIR/starts_ends_with.rs:34 :8
4355 |
4456LL | if s.chars().next_back().unwrap() != 'o' {
4557 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
4658
4759error: you should use the `ends_with` method
48- --> $DIR/starts_ends_with.rs:34 :8
60+ --> $DIR/starts_ends_with.rs:38 :8
4961 |
50- LL | if s.chars().last().unwrap() != 'o ' {
51- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o ')`
62+ LL | if s.chars().last().unwrap() != '/n ' {
63+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('/n ')`
5264
5365error: you should use the `ends_with` method
54- --> $DIR/starts_ends_with.rs:42 :5
66+ --> $DIR/starts_ends_with.rs:46 :5
5567 |
5668LL | "".chars().last() == Some(' ');
5769 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
5870
5971error: you should use the `ends_with` method
60- --> $DIR/starts_ends_with.rs:43 :5
72+ --> $DIR/starts_ends_with.rs:47 :5
6173 |
6274LL | Some(' ') != "".chars().last();
6375 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
6476
6577error: you should use the `ends_with` method
66- --> $DIR/starts_ends_with.rs:44 :5
78+ --> $DIR/starts_ends_with.rs:48 :5
6779 |
6880LL | "".chars().next_back() == Some(' ');
6981 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
7082
7183error: you should use the `ends_with` method
72- --> $DIR/starts_ends_with.rs:45 :5
84+ --> $DIR/starts_ends_with.rs:49 :5
7385 |
7486LL | Some(' ') != "".chars().next_back();
7587 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
7688
77- error: aborting due to 12 previous errors
89+ error: you should use the `ends_with` method
90+ --> $DIR/starts_ends_with.rs:52:5
91+ |
92+ LL | "".chars().last() == Some('/n');
93+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with('/n')`
94+
95+ error: you should use the `ends_with` method
96+ --> $DIR/starts_ends_with.rs:53:5
97+ |
98+ LL | Some('/n') != "".chars().last();
99+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with('/n')`
100+
101+ error: aborting due to 16 previous errors
78102
0 commit comments