From 8a9c9f748ec64dcae1a001664fcc580b07701dc3 Mon Sep 17 00:00:00 2001 From: mehmetcansahin Date: Fri, 6 May 2022 16:40:29 +0300 Subject: [PATCH] update icons.rs --- src/icons.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/icons.rs b/src/icons.rs index 6f4172c..e91f8d4 100644 --- a/src/icons.rs +++ b/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 {