Documentation: clippy::case_sensitive_file_extension_comparisons
Current Status: There is a temporary allowance in read_filename() in patina_dxe_core/src/pecoff.rs that needs follow up to determine whether to allow insensitive extensions in that case or not:
/// Parses a bytes buffer containing the filename.
fn read_filename(bytes: &[u8]) -> error::Result<Option<String>> {
let filename_end = bytes.iter().position(|&c| c == b'\0').unwrap_or(bytes.len());
let mut filename = String::from_utf8_lossy(bytes.get(..filename_end).unwrap_or(bytes)).into_owned();
#[allow(clippy::case_sensitive_file_extension_comparisons)]
// TODO: Determine whether case insensitivity is required here.
if filename.ends_with(".pdb") || filename.ends_with(".dll") {
filename.truncate(filename.len() - 4);
}
if let Some(index) = filename.rfind(|ref c| ['/', '\\'].contains(c)) {
filename.drain(..=index);
}
Ok(Some(format!("{filename}.efi")))
}
Documentation: clippy::case_sensitive_file_extension_comparisons
Current Status: There is a temporary allowance in
read_filename()inpatina_dxe_core/src/pecoff.rsthat needs follow up to determine whether to allow insensitive extensions in that case or not: