From 028b24de4db4d6a1ada0e4424aefa63f84af59f1 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Thu, 20 Mar 2025 00:19:43 +1000 Subject: [PATCH] Fix clippy warnings for detect-targets and binstalk-downloader (#2098) binstalk-downloader clippy warning is specific to windows Signed-off-by: Jiahao XU --- crates/binstalk-downloader/src/download/zip_extraction.rs | 6 ++++-- crates/detect-targets/src/detect/linux.rs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/binstalk-downloader/src/download/zip_extraction.rs b/crates/binstalk-downloader/src/download/zip_extraction.rs index 0bdfc425..cb5af6e7 100644 --- a/crates/binstalk-downloader/src/download/zip_extraction.rs +++ b/crates/binstalk-downloader/src/download/zip_extraction.rs @@ -1,6 +1,6 @@ use std::{ - fs::{self, create_dir_all, File}, - io::{self, Read}, + fs::{create_dir_all, File}, + io, path::Path, }; @@ -38,6 +38,8 @@ pub(super) fn do_extract_zip(f: File, dir: &Path) -> Result fs::remove_file(&path)?, _ => (), diff --git a/crates/detect-targets/src/detect/linux.rs b/crates/detect-targets/src/detect/linux.rs index 1b81f688..c1fcf75b 100644 --- a/crates/detect-targets/src/detect/linux.rs +++ b/crates/detect-targets/src/detect/linux.rs @@ -8,7 +8,7 @@ use tokio::{process::Command, task}; use tracing::debug; pub(super) async fn detect_targets(target: String) -> Vec { - let (prefix, postfix) = target + let (_, postfix) = target .rsplit_once('-') .expect("unwrap: target always has a -");