2 Checks for calls to `ends_with` with possible file extensions
3 and suggests to use a case-insensitive approach instead.
6 `ends_with` is case-sensitive and may not detect files with a valid extension.
10 fn is_rust_file(filename: &str) -> bool {
11 filename.ends_with(".rs")
16 fn is_rust_file(filename: &str) -> bool {
17 let filename = std::path::Path::new(filename);
19 .map_or(false, |ext| ext.eq_ignore_ascii_case("rs"))