fix clippy
This commit is contained in:
1 parent
8b4e0b3e07
commit
8d1c17ba7d
6 files changed
+12
-14
No files matched your search
@@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user