1 error: case-sensitive file extension comparison
2 --> $DIR/case_sensitive_file_extension_comparisons.rs:14:5
4 LL | filename.ends_with(".rs")
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^
7 = help: consider using a case-insensitive comparison instead
8 = note: `-D clippy::case-sensitive-file-extension-comparisons` implied by `-D warnings`
9 help: use std::path::Path
11 LL ~ std::path::Path::new(filename)
13 LL + .map_or(false, |ext| ext.eq_ignore_ascii_case("rs"))
16 error: case-sensitive file extension comparison
17 --> $DIR/case_sensitive_file_extension_comparisons.rs:19:13
19 LL | let _ = String::new().ends_with(".ext12");
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 = help: consider using a case-insensitive comparison instead
23 help: use std::path::Path
25 LL ~ let _ = std::path::Path::new(&String::new())
27 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
30 error: case-sensitive file extension comparison
31 --> $DIR/case_sensitive_file_extension_comparisons.rs:20:13
33 LL | let _ = "str".ends_with(".ext12");
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^
36 = help: consider using a case-insensitive comparison instead
37 help: use std::path::Path
39 LL ~ let _ = std::path::Path::new("str")
41 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
44 error: case-sensitive file extension comparison
45 --> $DIR/case_sensitive_file_extension_comparisons.rs:24:17
47 LL | let _ = "str".ends_with(".ext12");
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^
50 = help: consider using a case-insensitive comparison instead
51 help: use std::path::Path
53 LL ~ let _ = std::path::Path::new("str")
55 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("ext12"));
58 error: case-sensitive file extension comparison
59 --> $DIR/case_sensitive_file_extension_comparisons.rs:31:13
61 LL | let _ = String::new().ends_with(".EXT12");
62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64 = help: consider using a case-insensitive comparison instead
65 help: use std::path::Path
67 LL ~ let _ = std::path::Path::new(&String::new())
69 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
72 error: case-sensitive file extension comparison
73 --> $DIR/case_sensitive_file_extension_comparisons.rs:32:13
75 LL | let _ = "str".ends_with(".EXT12");
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^
78 = help: consider using a case-insensitive comparison instead
79 help: use std::path::Path
81 LL ~ let _ = std::path::Path::new("str")
83 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
86 error: aborting due to 6 previous errors