Skip to content

Commit

Permalink
Address clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dmartin committed Jan 6, 2025
1 parent 49ca234 commit e0d8b3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub(crate) fn sync_cache(
}
None => build_id.to_owned(),
};
tarballs.insert(build_id.into(), path_buf);
tarballs.insert(build_id, path_buf);
}
}
debug!("Found {} artifact tarballs", tarballs.len());
Expand Down Expand Up @@ -154,7 +154,7 @@ pub(crate) fn watch_dir(
thread::spawn({
let artifact_dir = PathBuf::from(artifact_dir);
let cache_dir = PathBuf::from(cache_dir);
let digest_salt = digest_salt.clone().map(|s| s.to_owned());
let digest_salt = digest_salt.map(|s| s.to_owned());
move || {
let (watcher_tx, watcher_rx) = std::sync::mpsc::channel();
let mut watcher: RecommendedWatcher = Watcher::new(watcher_tx, Duration::from_secs(2))
Expand Down Expand Up @@ -213,7 +213,7 @@ pub(crate) fn watch_dir(
extract_to(&cache_dir, &p).unwrap_or_else(|_| {
panic!("Failed to extract artifact tarball {}", p.display())
});
tx.blocking_send(BuildEvent::Update(build_id.into()))
tx.blocking_send(BuildEvent::Update(build_id))
.expect("Failed to send build event");
}
}
Expand Down Expand Up @@ -241,7 +241,7 @@ pub(crate) fn watch_dir(
cache_dir.display()
)
});
tx.blocking_send(BuildEvent::Delete(build_id.into()))
tx.blocking_send(BuildEvent::Delete(build_id))
.expect("Failed to send build event");
}
}
Expand Down

0 comments on commit e0d8b3c

Please sign in to comment.