From ad985d3d16220a4455cf2edca4938a43f8ff7992 Mon Sep 17 00:00:00 2001 From: SuperKali Date: Fri, 12 Dec 2025 08:31:01 +0100 Subject: [PATCH] Fix Windows build warnings - Add cfg guard for std::process::Command (only used on Linux/macOS) - Add #[allow(dead_code)] for unmount_device and sync_device --- src-tauri/src/flash/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src-tauri/src/flash/mod.rs b/src-tauri/src/flash/mod.rs index d8df6df..d3d9832 100644 --- a/src-tauri/src/flash/mod.rs +++ b/src-tauri/src/flash/mod.rs @@ -18,6 +18,7 @@ use sha2::{Digest, Sha256}; use std::fs::File; use std::io::Read; use std::path::PathBuf; +#[cfg(any(target_os = "linux", target_os = "macos"))] use std::process::Command; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use tokio::sync::Mutex; @@ -74,6 +75,7 @@ pub fn request_authorization(_device_path: &str) -> Result { } /// Unmount a device before flashing (platform-specific) +#[allow(dead_code)] pub(crate) fn unmount_device(device_path: &str) -> Result<(), String> { #[cfg(target_os = "macos")] { @@ -106,6 +108,7 @@ pub(crate) fn unmount_device(device_path: &str) -> Result<(), String> { } /// Sync device to ensure all data is written to disk +#[allow(dead_code)] pub(crate) fn sync_device(_device_path: &str) { #[cfg(any(target_os = "linux", target_os = "macos"))] {