2021-01-30 17:06:34 +00:00
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:13:5
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | filename.ends_with(".rs")
|
2023-01-12 18:48:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::case-sensitive-file-extension-comparisons` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::case_sensitive_file_extension_comparisons)]`
|
2023-01-12 18:48:13 +00:00
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ std::path::Path::new(filename)
|
|
|
|
LL + .extension()
|
|
|
|
LL + .map_or(false, |ext| ext.eq_ignore_ascii_case("rs"))
|
|
|
|
|
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:18:13
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | let _ = String::new().ends_with(".ext12");
|
2023-01-12 18:48:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
2023-01-12 18:48:13 +00:00
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ let _ = std::path::Path::new(&String::new())
|
|
|
|
LL + .extension()
|
|
|
|
LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
|
|
|
|
|
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:19:13
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "str".ends_with(".ext12");
|
2023-01-12 18:48:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
2023-01-12 18:48:13 +00:00
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ let _ = std::path::Path::new("str")
|
|
|
|
LL + .extension()
|
|
|
|
LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
|
|
|
|
|
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:23:17
|
2023-01-12 18:48:13 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "str".ends_with(".ext12");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ let _ = std::path::Path::new("str")
|
|
|
|
LL + .extension()
|
|
|
|
LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
|
|
|
|
|
|
|
|
|
|
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:30:13
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
2022-08-31 13:24:45 +00:00
|
|
|
LL | let _ = String::new().ends_with(".EXT12");
|
2023-01-12 18:48:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
2023-01-12 18:48:13 +00:00
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ let _ = std::path::Path::new(&String::new())
|
|
|
|
LL + .extension()
|
|
|
|
LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
|
|
|
|
|
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
error: case-sensitive file extension comparison
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/case_sensitive_file_extension_comparisons.rs:31:13
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "str".ends_with(".EXT12");
|
2023-01-12 18:48:13 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-30 17:06:34 +00:00
|
|
|
|
|
|
|
|
= help: consider using a case-insensitive comparison instead
|
2023-01-12 18:48:13 +00:00
|
|
|
help: use std::path::Path
|
|
|
|
|
|
|
|
|
LL ~ let _ = std::path::Path::new("str")
|
|
|
|
LL + .extension()
|
|
|
|
LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
|
|
|
|
|
|
2021-01-30 17:06:34 +00:00
|
|
|
|
2023-01-12 18:48:13 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2021-01-30 17:06:34 +00:00
|
|
|
|