From a60cd8f2a96aae3f7db8dfccec2aa5cf21f8c411 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 25 Aug 2024 17:30:02 +0200 Subject: refactor(treewide): Conform to `cargo clippy` --- src/watch/events/playlist_handler.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/watch/events/playlist_handler.rs') 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) -- cgit 1.4.1