@@ -13,66 +13,90 @@ LL | Some(' ') != "".chars().next();
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
14
14
15
15
error: 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
17
29
|
18
30
LL | if s.chars().next().unwrap() == 'f' {
19
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
20
32
21
33
error: you should use the `ends_with` method
22
- --> $DIR/starts_ends_with.rs:18 :8
34
+ --> $DIR/starts_ends_with.rs:22 :8
23
35
|
24
36
LL | if s.chars().next_back().unwrap() == 'o' {
25
37
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
26
38
|
27
39
= note: `-D clippy::chars-last-cmp` implied by `-D warnings`
28
40
29
41
error: you should use the `ends_with` method
30
- --> $DIR/starts_ends_with.rs:22 :8
42
+ --> $DIR/starts_ends_with.rs:26 :8
31
43
|
32
44
LL | if s.chars().last().unwrap() == 'o' {
33
45
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
34
46
35
47
error: you should use the `starts_with` method
36
- --> $DIR/starts_ends_with.rs:26 :8
48
+ --> $DIR/starts_ends_with.rs:30 :8
37
49
|
38
50
LL | if s.chars().next().unwrap() != 'f' {
39
51
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
40
52
41
53
error: you should use the `ends_with` method
42
- --> $DIR/starts_ends_with.rs:30 :8
54
+ --> $DIR/starts_ends_with.rs:34 :8
43
55
|
44
56
LL | if s.chars().next_back().unwrap() != 'o' {
45
57
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
46
58
47
59
error: you should use the `ends_with` method
48
- --> $DIR/starts_ends_with.rs:34 :8
60
+ --> $DIR/starts_ends_with.rs:38 :8
49
61
|
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 ')`
52
64
53
65
error: you should use the `ends_with` method
54
- --> $DIR/starts_ends_with.rs:42 :5
66
+ --> $DIR/starts_ends_with.rs:46 :5
55
67
|
56
68
LL | "".chars().last() == Some(' ');
57
69
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
58
70
59
71
error: you should use the `ends_with` method
60
- --> $DIR/starts_ends_with.rs:43 :5
72
+ --> $DIR/starts_ends_with.rs:47 :5
61
73
|
62
74
LL | Some(' ') != "".chars().last();
63
75
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
64
76
65
77
error: you should use the `ends_with` method
66
- --> $DIR/starts_ends_with.rs:44 :5
78
+ --> $DIR/starts_ends_with.rs:48 :5
67
79
|
68
80
LL | "".chars().next_back() == Some(' ');
69
81
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
70
82
71
83
error: you should use the `ends_with` method
72
- --> $DIR/starts_ends_with.rs:45 :5
84
+ --> $DIR/starts_ends_with.rs:49 :5
73
85
|
74
86
LL | Some(' ') != "".chars().next_back();
75
87
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
76
88
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
78
102
0 commit comments