chore(clippy): app.rs, mime_app.rs
This commit is contained in:
parent
2e378ab261
commit
cfe045827d
2 changed files with 97 additions and 117 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue