about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/select/cmds.rs4
-rw-r--r--src/storage/video_database/downloader.rs5
-rw-r--r--src/update/mod.rs3
-rw-r--r--src/watch/events/mod.rs6
4 files changed, 10 insertions, 8 deletions
diff --git a/src/select/cmds.rs b/src/select/cmds.rs
index 31589f2..3a7a800 100644
--- a/src/select/cmds.rs
+++ b/src/select/cmds.rs
@@ -81,5 +81,7 @@ async fn handle_status_change(
 fn compute_priority(line_number: Option<i64>, priority: Option<i64>) -> Option<i64> {
     if let Some(pri) = priority {
         Some(pri)
-    } else { line_number }
+    } else {
+        line_number
+    }
 }
diff --git a/src/storage/video_database/downloader.rs b/src/storage/video_database/downloader.rs
index c5490f3..ccd4ca9 100644
--- a/src/storage/video_database/downloader.rs
+++ b/src/storage/video_database/downloader.rs
@@ -43,7 +43,10 @@ pub async fn get_next_uncached_video(app: &App) -> Result<Option<Video>> {
     } else {
         let base = result?;
 
-        let thumbnail_url = base.thumbnail_url.as_ref().map(|url| Url::parse(url).expect("Parsing this as url should always work"));
+        let thumbnail_url = base
+            .thumbnail_url
+            .as_ref()
+            .map(|url| Url::parse(url).expect("Parsing this as url should always work"));
 
         let status_change = if base.status_change == 1 {
             true
diff --git a/src/update/mod.rs b/src/update/mod.rs
index 69551ed..ce0a7e5 100644
--- a/src/update/mod.rs
+++ b/src/update/mod.rs
@@ -181,7 +181,8 @@ async fn process_subscription(
 
         // TODO: The algorithm is not exactly the best <2024-05-28>
         (Some(thumbnails), None) => Some(
-            thumbnails.first()
+            thumbnails
+                .first()
                 .expect("At least one should exist")
                 .url
                 .clone(),
diff --git a/src/watch/events/mod.rs b/src/watch/events/mod.rs
index 1459147..41a7772 100644
--- a/src/watch/events/mod.rs
+++ b/src/watch/events/mod.rs
@@ -69,11 +69,7 @@ impl MpvEventHandler {
         let current_playlist = self.playlist_handler.playlist_ids(mpv)?;
         let play_things = play_things
             .into_iter()
-            .filter(|val| {
-                !current_playlist
-                    .values()
-                    .any(|a| a == &val.extractor_hash)
-            })
+            .filter(|val| !current_playlist.values().any(|a| a == &val.extractor_hash))
             .filter(|val| {
                 if self
                     .watch_later_block_list