chore(clippy): app.rs, mime_app.rs

This commit is contained in:
Josh Megnauth 2025-01-27 02:17:50 -05:00 • committed by Jeremy Soller
parent 2e378ab261
commit cfe045827d
2 changed files with 97 additions and 117 deletions

View file

@ -278,12 +278,12 @@ impl MimeAppCache {
pub fn get(&self, key: &Mime) -> &[MimeApp] {
static EMPTY: Vec<MimeApp> = Vec::new();
self.cache.get(key).unwrap_or_else(|| &EMPTY)
self.cache.get(key).unwrap_or(&EMPTY)
}
pub fn icons(&self, key: &Mime) -> &[widget::icon::Handle] {
static EMPTY: Vec<widget::icon::Handle> = Vec::new();
self.icons.get(key).unwrap_or_else(|| &EMPTY)
self.icons.get(key).unwrap_or(&EMPTY)
}
pub fn terminal(&self) -> Option<&MimeApp> {
@ -348,3 +348,9 @@ impl MimeAppCache {
}
}
}
impl Default for MimeAppCache {
fn default() -> Self {
Self::new()
}
}