From 7450393e979ff4cc19267e7c2dfb688f9489ffd8 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 22 Sep 2021 22:44:28 +0200 Subject: [PATCH] fix(desktop-entries): Deduplicate AppIDs across sources Closes #19 --- plugins/src/desktop_entries/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/src/desktop_entries/mod.rs b/plugins/src/desktop_entries/mod.rs index ad370f8..e15a5dc 100644 --- a/plugins/src/desktop_entries/mod.rs +++ b/plugins/src/desktop_entries/mod.rs @@ -26,13 +26,12 @@ struct Item { impl Hash for Item { fn hash(&self, state: &mut H) { self.appid.hash(state); - self.src.hash(state); } } impl PartialEq for Item { fn eq(&self, other: &Self) -> bool { - self.appid == other.appid && self.src == other.src + self.appid == other.appid } } @@ -143,7 +142,7 @@ impl App { src, }; - deduplicator.insert(item); + deduplicator.replace(item); } } }