Compare commits
2 commits
8a152d4118
...
6d55b3c309
Author | SHA1 | Date | |
---|---|---|---|
6d55b3c309 | |||
b09b871b3d |
2 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use mime_guess::Mime;
|
use mime_guess::Mime;
|
||||||
use smartstring::alias::String;
|
|
||||||
|
|
||||||
use crate::inspectors::mime_extension_lookup;
|
use crate::inspectors::mime_extension_lookup;
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ pub struct Findings {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Findings {
|
impl Findings {
|
||||||
pub fn recommended_extension(&self) -> Option<String> {
|
pub fn recommended_extension(&self) -> Option<&str> {
|
||||||
mime_extension_lookup(self.mime.clone()).map(|extensions| extensions[0].to_owned())
|
mime_extension_lookup(self.mime.clone()).map(|extensions| &*extensions[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue