update icons.rs
This commit is contained in:
parent
58ce13aa29
commit
8a9c9f748e
1 changed files with 9 additions and 1 deletions
10
src/icons.rs
10
src/icons.rs
|
@ -52,7 +52,15 @@ impl Icons {
|
|||
.pending_entries
|
||||
.get_mut(&url)
|
||||
.map(|(kind, _)| kind)
|
||||
.or_else(|| entries.find_map(|icon| (icon.url == url).then_some(&mut icon.kind)))
|
||||
.or_else(|| {
|
||||
entries.find_map(|icon| {
|
||||
if icon.url.eq(&url) {
|
||||
Some(&mut icon.kind)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
})
|
||||
{
|
||||
// if the kind is more important, replace it
|
||||
if &kind > existing_kind {
|
||||
|
|
Reference in a new issue