2017-10-10 05:45:03 +02:00
|
|
|
error: you should use the `starts_with` method
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:19:5
|
|
|
|
|
|
|
|
|
19 | "".chars().next() == Some(' ');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
|
|
|
|
|
|
|
|
|
= 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:20:5
|
2018-08-01 16:30:44 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
20 | Some(' ') != "".chars().next();
|
2018-08-01 16:30:44 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2018-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:25:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
25 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:28:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
28 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:31:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
31 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:34:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
34 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:37:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
37 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:40:8
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
40 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:47:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
47 | "".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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:48:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
48 | 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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:49:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
49 | "".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-10-06 18:18:06 +02:00
|
|
|
--> $DIR/starts_ends_with.rs:50:5
|
2017-10-10 05:45:03 +02:00
|
|
|
|
|
2018-10-06 18:18:06 +02:00
|
|
|
50 | 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
|
|
|
|
|