chore: clippy
This commit is contained in:
parent
4a4d5c0a9e
commit
909577b364
9 changed files with 121 additions and 146 deletions
|
|
@ -69,7 +69,7 @@ pub fn mime_for_path<P: AsRef<Path>>(
|
|||
gb.file_name(file_name);
|
||||
}
|
||||
} else {
|
||||
gb.path(&path);
|
||||
gb.path(path);
|
||||
}
|
||||
if let Some(metadata) = metadata_opt {
|
||||
gb.metadata(metadata.clone());
|
||||
|
|
@ -77,7 +77,7 @@ pub fn mime_for_path<P: AsRef<Path>>(
|
|||
let guess = gb.guess();
|
||||
if guess.uncertain() {
|
||||
// If uncertain, try mime_guess. This could happen on platforms without shared-mime-info
|
||||
mime_guess::from_path(&path).first_or_octet_stream()
|
||||
mime_guess::from_path(path).first_or_octet_stream()
|
||||
} else {
|
||||
guess.mime_type().clone()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue