Compare commits

..

No commits in common. "6d55b3c309f98b7c9998c5b2419dda4ddc7bc03a" and "8a152d41189dd7a3c52d398a14e51627c3eb39b4" have entirely different histories.

2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
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;
@ -15,7 +16,7 @@ pub struct Findings {
} }
impl Findings { impl Findings {
pub fn recommended_extension(&self) -> Option<&str> { pub fn recommended_extension(&self) -> Option<String> {
mime_extension_lookup(self.mime.clone()).map(|extensions| &*extensions[0]) mime_extension_lookup(self.mime.clone()).map(|extensions| extensions[0].to_owned())
} }
} }