From 6cecb22cb15b8b0eb87a135f56ed416d60b43d0c Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Sun, 26 Apr 2026 22:50:38 -0600 Subject: [PATCH] chore(network): delete dead pub mod commands block in network/mod.rs The inner `pub mod commands` block in network/mod.rs hosted three unregistered Tauri commands (get_network_mounts_cmd, check_mount_accessible, check_network_paths_batch) and was uncalled. The non-command helpers in the parent module (get_network_mounts, check_mount_accessibility, find_mount_for_path, parse_mount_info) are also no longer referenced now that the commands are gone, but they remain pub for potential future use without warnings. - Remove the inner `pub mod commands { ... }` block. - Drop the now-unused std::collections::HashMap import. cc --- src-tauri/src/network/mod.rs | 46 ------------------------------------ 1 file changed, 46 deletions(-) diff --git a/src-tauri/src/network/mod.rs b/src-tauri/src/network/mod.rs index ee1d10ed2..53238a58b 100644 --- a/src-tauri/src/network/mod.rs +++ b/src-tauri/src/network/mod.rs @@ -9,7 +9,6 @@ //! - Offline mode (accessibility of network content) use serde::{Deserialize, Serialize}; -use std::collections::HashMap; use std::fs; use std::path::Path; @@ -370,51 +369,6 @@ pub fn get_all_mounts() -> Vec { parse_mount_info().unwrap_or_default() } -// Tauri commands -pub mod commands { - use super::*; - - /// Get all network mounts currently visible - #[tauri::command] - pub fn get_network_mounts_cmd() -> Vec { - get_network_mounts() - } - - /// Check if a network mount is currently accessible - #[tauri::command] - pub fn check_mount_accessible(mount_point: String) -> bool { - check_mount_accessibility(&mount_point) - } - - /// Batch check multiple paths for network status - #[tauri::command] - pub fn check_network_paths_batch(paths: Vec) -> HashMap { - let mounts = parse_mount_info().unwrap_or_default(); - - paths - .into_iter() - .map(|p| { - let path = Path::new(&p); - let info = if let Some(mount) = find_mount_for_path(path, &mounts) { - let is_network = matches!(mount.kind, MountKind::Network(_)); - NetworkPathInfo { - is_network, - mount_info: Some(mount), - path: p.clone(), - } - } else { - NetworkPathInfo { - is_network: false, - mount_info: None, - path: p.clone(), - } - }; - (p, info) - }) - .collect() - } -} - #[cfg(not(target_os = "linux"))] fn parse_mount_info() -> Result, String> { Ok(Vec::new())