Skip to content

refactor: remove unused greet command - #15

Merged
yejiming merged 1 commit into
yejiming:mainfrom
whitelonng:fix/08-09-remove-unused-code
Jun 21, 2026
Merged

refactor: remove unused greet command#15
yejiming merged 1 commit into
yejiming:mainfrom
whitelonng:fix/08-09-remove-unused-code

Conversation

@whitelonng

Copy link
Copy Markdown
Contributor

Summary

Removes the unused greet command, which was 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
  • ✅ 186 Rust unit tests pass
  • ✅ TypeScript type check passes

Note on Issue #9 (reqwest::blocking)

After investigation, reqwest::blocking is actively used by the crawler.rs module for the crawl_fanqie_article command:

// src-tauri/src/crawler.rs
use reqwest::blocking::Client;

pub fn crawl_fanqie_article(...) -> Result<String, String> {
    let client = Client::builder()...
    // Used for synchronous HTTP requests
}

The blocking feature cannot be removed without:

  1. Migrating the entire crawler module to async
  2. Converting crawl_fanqie_article command to async
  3. Updating all HTTP requests in crawler to use async reqwest::Client

This is a larger refactor beyond the scope of removing unused code. Issue #9 may be:

  • A false positive (blocking feature is actually used)
  • A suggestion for future async migration (not a bug)

Test Plan

  • ✅ All Rust unit tests pass
  • ✅ TypeScript compilation passes
  • Manual verification: no references to greet in frontend code

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 yejiming#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
@yejiming
yejiming merged commit 0b1c9ab into yejiming:main Jun 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants