2017-10-10 05:45:03 +02:00
|
|
|
error: you should use the `starts_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:9:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
9 | "".chars().next() == Some(' ');
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::chars-next-cmp` implied by `-D warnings`
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:10:5
|
|
|
|
|
|
|
|
|
10 | Some(' ') != "".chars().next();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:15:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
15 | if s.chars().next().unwrap() == 'f' { // s.starts_with('f')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:18:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
18 | if s.chars().next_back().unwrap() == 'o' { // s.ends_with('o')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::chars-last-cmp` implied by `-D warnings`
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:21:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
21 | if s.chars().last().unwrap() == 'o' { // s.ends_with('o')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:24:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
24 | if s.chars().next().unwrap() != 'f' { // !s.starts_with('f')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:27:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
27 | if s.chars().next_back().unwrap() != 'o' { // !s.ends_with('o')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:30:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
30 | if s.chars().last().unwrap() != 'o' { // !s.ends_with('o')
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:37:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
37 | "".chars().last() == Some(' ');
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:38:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
38 | Some(' ') != "".chars().last();
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:39:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
39 | "".chars().next_back() == Some(' ');
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2018-08-01 16:30:44 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:40:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
40 | Some(' ') != "".chars().next_back();
|
2017-10-10 05:45:03 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
|
|
|
|
|
2018-01-16 17:06:27 +01:00
|
|
|
error: aborting due to 12 previous errors
|
|
|
|
|