about summary refs log tree commit diff stats
path: root/src/update/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/update/mod.rs')
-rw-r--r--src/update/mod.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/update/mod.rs b/src/update/mod.rs
index ce31c7b..69551ed 100644
--- a/src/update/mod.rs
+++ b/src/update/mod.rs
@@ -37,7 +37,7 @@ pub async fn update(
     subs_to_update: Vec<String>,
     verbosity: u8,
 ) -> Result<()> {
-    let subscriptions = get_subscriptions(&app).await?;
+    let subscriptions = get_subscriptions(app).await?;
     let mut back_subs: HashMap<Url, Subscription> = HashMap::new();
     let logging = verbosity > 0;
     let log_level = match verbosity {
@@ -71,7 +71,7 @@ pub async fn update(
         .arg(urls.len().to_string())
         .arg(log_level.to_string())
         .args(&urls)
-        .args(&hashes.iter().map(|haz| haz.to_string()).collect::<Vec<_>>())
+        .args(hashes.iter().map(|haz| haz.to_string()).collect::<Vec<_>>())
         .stdout(Stdio::piped())
         .stderr(if logging {
             Stdio::inherit()
@@ -124,7 +124,7 @@ async fn process_subscription(
     app: &App,
     sub: &Subscription,
     entry: InfoJson,
-    hashes: &Vec<blake3::Hash>,
+    hashes: &[blake3::Hash],
 ) -> Result<()> {
     macro_rules! unwrap_option {
         ($option:expr) => {
@@ -181,8 +181,7 @@ async fn process_subscription(
 
         // TODO: The algorithm is not exactly the best <2024-05-28>
         (Some(thumbnails), None) => Some(
-            thumbnails
-                .get(0)
+            thumbnails.first()
                 .expect("At least one should exist")
                 .url
                 .clone(),