about summary refs log tree commit diff stats
path: root/src/watch/events/playlist_handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/watch/events/playlist_handler.rs')
-rw-r--r--src/watch/events/playlist_handler.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/watch/events/playlist_handler.rs b/src/watch/events/playlist_handler.rs
index 8f2f322..0933856 100644
--- a/src/watch/events/playlist_handler.rs
+++ b/src/watch/events/playlist_handler.rs
@@ -86,9 +86,7 @@ impl PlaylistHandler {
         }
 
         for (id, hash) in playlist {
-            if !self.playlist_ids.contains_key(&id) {
-                self.playlist_ids.insert(id, hash);
-            }
+            self.playlist_ids.entry(id).or_insert(hash);
         }
 
         Ok(&self.playlist_ids)