From 2d42772718541958bff36d91e9fe5704191e69c0 Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Fri, 8 Aug 2025 14:23:51 +0400 Subject: [PATCH] chore: linting --- src-tauri/src/app_auto_updater.rs | 62 ------------------------------- 1 file changed, 62 deletions(-) diff --git a/src-tauri/src/app_auto_updater.rs b/src-tauri/src/app_auto_updater.rs index 68e740f..8b8d550 100644 --- a/src-tauri/src/app_auto_updater.rs +++ b/src-tauri/src/app_auto_updater.rs @@ -1563,68 +1563,6 @@ pub struct PlatformInfo { pub supported_formats: Vec, } -#[tauri::command] -pub async fn get_platform_info() -> Result { - let os = if cfg!(target_os = "macos") { - "macos".to_string() - } else if cfg!(target_os = "windows") { - "windows".to_string() - } else if cfg!(target_os = "linux") { - "linux".to_string() - } else { - "unknown".to_string() - }; - - let arch = if cfg!(target_arch = "aarch64") { - "aarch64".to_string() - } else if cfg!(target_arch = "x86_64") { - "x64".to_string() - } else { - "unknown".to_string() - }; - - let installation_method = { - #[cfg(target_os = "linux")] - { - AppAutoUpdater::instance().detect_linux_installation_method() - } - #[cfg(target_os = "macos")] - { - "app_bundle".to_string() - } - #[cfg(target_os = "windows")] - { - "installer".to_string() - } - #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "linux")))] - { - "unknown".to_string() - } - }; - - let supported_formats = if cfg!(target_os = "macos") { - vec!["dmg".to_string()] - } else if cfg!(target_os = "windows") { - vec!["msi".to_string(), "exe".to_string(), "zip".to_string()] - } else if cfg!(target_os = "linux") { - vec![ - "deb".to_string(), - "rpm".to_string(), - "appimage".to_string(), - "tar.gz".to_string(), - ] - } else { - vec![] - }; - - Ok(PlatformInfo { - os, - arch, - installation_method, - supported_formats, - }) -} - #[cfg(test)] mod tests { use super::*;