We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fc4443 commit b154785Copy full SHA for b154785
src/file/source/file.rs
@@ -38,14 +38,9 @@ impl FileSourceFile {
38
if let Some(format) = format_hint {
39
return Ok((filename, Box::new(format)));
40
} else {
41
+ let ext = filename.extension().unwrap_or_default().to_string_lossy();
42
for (format, extensions) in all_extensions().iter() {
- if extensions.contains(
43
- &filename
44
- .extension()
45
- .unwrap_or_default()
46
- .to_string_lossy()
47
- .as_ref(),
48
- ) {
+ if extensions.contains(&ext.as_ref()) {
49
return Ok((filename, Box::new(*format)));
50
}
51
0 commit comments