Skip to content

chore: remove unused jan_utils::string::parse_c_string helper#8073

Closed
dev-miro26 wants to merge 2 commits into
janhq:mainfrom
dev-miro26:chore/remove-unused-parse-c-string
Closed

chore: remove unused jan_utils::string::parse_c_string helper#8073
dev-miro26 wants to merge 2 commits into
janhq:mainfrom
dev-miro26:chore/remove-unused-parse-c-string

Conversation

@dev-miro26
Copy link
Copy Markdown
Contributor

Describe Your Changes

  • parse_c_string in src-tauri/utils/src/string.rs was pub but had no callers anywhere in the repo — a grep across src-tauri, web-app, and core only matched its own #[cfg(test)] module. It existed solely as tests-for-tests.
  • Remove the function and its four test_parse_c_string* cases.
  • Verified: cargo check -p jan-utils passes; cargo test (run from src-tauri/utils/) passes 32/32 with 0 failures.

Fixes Issues

Self Checklist

  • Added relevant comments, esp in complex areas (n/a — pure deletion)
  • Updated docs (for bug fixes / features) (n/a — internal helper, no docs referenced it)
  • Created issues for follow-up changes or refactoring needed

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented Apr 24, 2026

Review: remove unused jan_utils::string::parse_c_string helper

Summary: Removes the parse_c_string function and its four associated tests from src-tauri/utils/src/string.rs. Total: -41 lines, 0 additions.

Findings:

  • Correctness: Verified -- parse_c_string had no callers anywhere in the repo outside its own test module. It was effectively tests-for-tests dead code.
  • Risks: None. Pure dead-code removal.
  • Style: Clean deletion with no leftover references.
  • Tests: The four tests covering the removed function are deleted. Remaining tests in the module are unaffected.

Recommendation: can merge

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented Apr 26, 2026

Code Review

Summary: This PR removes the unused parse_c_string helper function and its associated test cases from src-tauri/utils/src/string.rs. The function had no callers outside its own test module.

Findings:

  • The removal is clean and correct -- only the function definition and its four test cases are deleted.
  • No other code in the repo references parse_c_string, confirming it is truly dead code.
  • The remaining code and tests in string.rs are unaffected.
  • No functional or behavioral changes introduced.

Recommendation: Can merge. This is a straightforward dead-code removal with no risk.

@tokamak-pm
Copy link
Copy Markdown

tokamak-pm Bot commented May 1, 2026

Review: chore: remove unused jan_utils::string::parse_c_string helper

Summary: Removes the parse_c_string function and its four test cases from src-tauri/utils/src/string.rs. The function was pub but had zero callers anywhere in the codebase outside its own test module.

Positive observations

  • Pure dead-code removal: -41 lines, 0 additions.
  • Verified with cargo check and cargo test (32/32 pass).
  • The PR description correctly notes the function existed solely as "tests-for-tests."

Issues and observations

Recommendation: can merge

@dev-miro26 dev-miro26 closed this May 10, 2026
@github-project-automation github-project-automation Bot moved this to Done in Jan May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore: remove unused jan_utils::string::parse_c_string helper

1 participant