From 0f5bd68401ff9619e125873ba665ded0c8dfaaab Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 29 Oct 2026 01:02:02 +0000 Subject: [PATCH] fix(review): keep the Linux and macOS builds of default_folder warning-free The ubuntu Clippy gate caught what the dev machine cannot check (ring needs a Linux C compiler): the Arch import is Windows-only, the macOS arm consumes its unused parameters, and the Linux test calls the three-argument signature. --- crates/native/src/install.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/native/src/install.rs b/crates/native/src/install.rs index 3226269d..8b744cdc 100644 --- a/crates/native/src/install.rs +++ b/crates/native/src/install.rs @@ -23,9 +23,11 @@ use std::path::{Path, PathBuf}; +#[cfg(windows)] +use artcraft_launcher_core::Arch; use artcraft_launcher_core::protocol::{CANCELLED, INSTALL_CANCELLED, InstallLocations, JobPhase}; use artcraft_launcher_core::release::{self, Asset, Release}; -use artcraft_launcher_core::{Arch, CraftApp, InstallSource, Installed, PackageKind, version}; +use artcraft_launcher_core::{CraftApp, InstallSource, Installed, PackageKind, version}; use crate::http::{Http, Stop, Transfer}; use crate::manifest::Record; @@ -313,7 +315,7 @@ pub fn default_folder(kind: PackageKind, arch: Option, paths: &Paths) -> O } #[cfg(target_os = "macos")] { - let _ = arch; + let _ = (arch, paths); (kind == PackageKind::Dmg).then(|| macos::applications_dir(None, None).ok()).flatten() } #[cfg(not(any(windows, target_os = "macos")))] @@ -1955,8 +1957,8 @@ mod tests { #[test] fn formats_the_system_manages_have_no_single_default_folder() { let paths = Paths::under(std::path::Path::new("/tmp/scratch")); - assert_eq!(default_folder(PackageKind::Deb, &paths), None); - assert_eq!(default_folder(PackageKind::AppImage, &paths), None); + assert_eq!(default_folder(PackageKind::Deb, None, &paths), None); + assert_eq!(default_folder(PackageKind::AppImage, None, &paths), None); } #[cfg(unix)]