fix clippy

This commit is contained in:
Evan Almloff committed 2023-08-09 11:10:41 -07:00
1 parent 8b4e0b3e07
commit 8d1c17ba7d
6 files changed
+12 -14

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),
};