2017-10-10 03:45:03 +00:00
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:7:5
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | "".chars().next() == Some(' ');
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with(' ')`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::chars-next-cmp` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::chars_next_cmp)]`
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:8:5
|
2018-08-01 14:30:44 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | Some(' ') != "".chars().next();
|
2018-08-01 14:30:44 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with(' ')`
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:11:5
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | "".chars().next() == Some('\n');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".starts_with('\n')`
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:12:5
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | Some('\n') != "".chars().next();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".starts_with('\n')`
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:17:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if s.chars().next().unwrap() == 'f' {
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.starts_with('f')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:21:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if s.chars().next_back().unwrap() == 'o' {
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::chars-last-cmp` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::chars_last_cmp)]`
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:25:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if s.chars().last().unwrap() == 'o' {
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `s.ends_with('o')`
|
|
|
|
|
|
|
|
error: you should use the `starts_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:29:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if s.chars().next().unwrap() != 'f' {
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.starts_with('f')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:33:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | if s.chars().next_back().unwrap() != 'o' {
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('o')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:37:8
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | if s.chars().last().unwrap() != '\n' {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!s.ends_with('\n')`
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:45:5
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | "".chars().last() == Some(' ');
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:46:5
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | Some(' ') != "".chars().last();
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:47:5
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | "".chars().next_back() == Some(' ');
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with(' ')`
|
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:48:5
|
2017-10-10 03:45:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | Some(' ') != "".chars().next_back();
|
2017-10-10 03:45:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with(' ')`
|
|
|
|
|
2022-02-10 17:40:06 +00:00
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:51:5
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | "".chars().last() == Some('\n');
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `"".ends_with('\n')`
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
|
|
error: you should use the `ends_with` method
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/starts_ends_with.rs:52:5
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | Some('\n') != "".chars().last();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!"".ends_with('\n')`
|
2022-02-10 17:40:06 +00:00
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|