fix clippy

This commit is contained in:
Evan Almloff committed 2023-08-08 13:43:57 -07:00
1 parent 4ee4cf23d3
commit 24c626b306
9 files changed
+30 -27

No files matched your search

+7 -2
View File
@@ -158,8 +158,13 @@ fn get_mime_from_path(trimmed: &Path) -> Result<&'static str> {
}
let res = match infer::get_from_path(trimmed)?.map(|f| f.mime_type()) {
Some(t) if t == "text/plain" => get_mime_by_ext(trimmed),
Some(f) => f,
Some(f) => {
if f == "text/plain" {
get_mime_by_ext(trimmed)
} else {
f
}
}
None => get_mime_by_ext(trimmed),
};