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:26:13
47 LL | let _ = String::new().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(&String::new())
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:27:13
61 LL | let _ = "str".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("str")
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:30:13
75 LL | let _ = String::new().to_lowercase().ends_with(".EXT12");
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78 = help: consider using a case-insensitive comparison instead
79 = note: to_lowercase allocates memory, this can be avoided by using Path
80 help: use std::path::Path
82 LL ~ let _ = std::path::Path::new(&String::new())
84 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
87 error: case-sensitive file extension comparison
88 --> $DIR/case_sensitive_file_extension_comparisons.rs:31:13
90 LL | let _ = String::new().to_uppercase().ends_with(".EXT12");
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 = help: consider using a case-insensitive comparison instead
94 = note: to_uppercase allocates memory, this can be avoided by using Path
95 help: use std::path::Path
97 LL ~ let _ = std::path::Path::new(&String::new())
99 LL ~ .map_or(false, |ext| ext.eq_ignore_ascii_case("EXT12"));
102 error: aborting due to 7 previous errors