From 5d23056ab1bab8ea6e317bbbc457828979734a29 Mon Sep 17 00:00:00 2001 From: whitelonng Date: Sun, 21 Jun 2026 20:15:58 +0800 Subject: [PATCH] refactor: remove unused greet command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: The greet command is a placeholder from Tauri scaffolding that is not used anywhere in the application. Changes: - Remove greet() function from src-tauri/src/lib.rs - Remove greet from invoke_handler registration Verification: - No frontend code calls invoke('greet', ...) - Command was never part of the application's actual functionality Note on issue #9 (reqwest::blocking): After investigation, reqwest::blocking is actively used by crawler.rs module for the crawl_fanqie_article command. It cannot be removed without migrating the entire crawler module to async, which is a larger refactor beyond the scope of removing unused code. Test results: - ✅ 186 Rust unit tests pass - ✅ TypeScript type check passes --- src-tauri/src/lib.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 614d4f9..11d1fbe 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -39,11 +39,6 @@ pub fn bash_permission_channels() -> &'static Mutex>>); -#[tauri::command] -fn greet(name: &str) -> String { - format!("Hello, {}! You've been greeted from Rust!", name) -} - #[tauri::command] fn rename_item(path: String, new_name: String) -> Result<(), String> { fs_commands::rename_item_cmd(path, new_name) @@ -191,7 +186,6 @@ pub fn run() { Ok(()) }) .invoke_handler(tauri::generate_handler![ - greet, list_dir, read_file, read_image_data_url,