From 202bf7ae6dcc07646eb601cd5a3ef43094399a61 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 00:52:12 +0000 Subject: [PATCH] chore: drop stale dead_code allows + dead helper Two web/state.rs fields (settings_tab, voice_participants_map) and one client/storage.rs helper (save_download) carried #[allow(dead_code)] from in-flight PRs that have since landed or closed. Fields now read across app.rs, event_processing.rs, call_page.rs, channel_sidebar.rs. save_download has zero callers anywhere in the tree. Closes #196 --- crates/client/src/storage.rs | 11 ----------- crates/web/src/state.rs | 2 -- 2 files changed, 13 deletions(-) diff --git a/crates/client/src/storage.rs b/crates/client/src/storage.rs index e17cfba0..4e62c2bd 100644 --- a/crates/client/src/storage.rs +++ b/crates/client/src/storage.rs @@ -229,17 +229,6 @@ pub fn load_events(server_id: &str) -> Vec { // Vec in memory. Removed as part of compat.rs deletion. // See SqliteDagStore above for the live DAG persistence path. -/// Save a downloaded file to the downloads directory. Returns the path. -#[cfg(not(target_arch = "wasm32"))] -#[allow(dead_code)] -pub fn save_download(filename: &str, data: &[u8]) -> Option { - let dir = dirs::download_dir().unwrap_or_else(|| data_dir().join("downloads")); - std::fs::create_dir_all(&dir).ok(); - let path = dir.join(filename); - std::fs::write(&path, data).ok()?; - Some(path) -} - // ---- Native implementation -------------------------------------------------- #[cfg(not(target_arch = "wasm32"))] diff --git a/crates/web/src/state.rs b/crates/web/src/state.rs index 27c03122..842ad931 100644 --- a/crates/web/src/state.rs +++ b/crates/web/src/state.rs @@ -274,7 +274,6 @@ pub struct UiState { pub show_call_page: ReadSignal, pub show_palette: ReadSignal, pub call_layout: ReadSignal, - #[allow(dead_code)] pub settings_tab: ReadSignal, pub join_token: ReadSignal>, /// "", "connecting", or "denied:". @@ -287,7 +286,6 @@ pub struct VoiceState { pub voice_muted: ReadSignal, pub voice_deafened: ReadSignal, /// Participants per voice channel. - #[allow(dead_code)] pub voice_participants_map: ReadSignal>>, pub voice_channel_name: ReadSignal, pub video_source: ReadSignal>,