Skip to content

chore: Fix clippy warnings#1532

Open
KuSh wants to merge 1 commit intortk-ai:developfrom
KuSh:clippy-fixes
Open

chore: Fix clippy warnings#1532
KuSh wants to merge 1 commit intortk-ai:developfrom
KuSh:clippy-fixes

Conversation

@KuSh
Copy link
Copy Markdown
Collaborator

@KuSh KuSh commented Apr 25, 2026

Summary

  • Path Centralization: Hardcoded directory and file paths across all hook logic () are replaced with dedicated, exported constants in . This prevents magic strings and simplifies maintenance when system directories change.
  • Code Cleanup: Move all code only used by tests behind cfg(test) attribute
  • Refactoring: Apply Clippy fixes and address remaining warnings

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected

@pszymkowiak pszymkowiak added effort-medium 1-2 jours, quelques fichiers enhancement New feature or request labels Apr 25, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

♻️ Type refactor
🟡 Risk medium

Summary

This PR centralizes hardcoded directory/file paths into exported constants, moves test-only code behind cfg(test) attributes to eliminate dead_code warnings, and applies various Clippy fixes including collapsing nested if-statements, replacing match-then-map with .map(), and fixing off-by-one boundary checks in buffer capping logic.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

- **Path Centralization:** Hardcoded directory and file paths across all hook logic () are replaced with dedicated, exported constants in . This prevents magic strings and simplifies maintenance when system directories change.
- **Code Cleanup:** Move all code only used by tests behind cfg(test) attribute
- **Refactoring:** Apply Clippy fixes and address remaining warnings

Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium 1-2 jours, quelques fichiers enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants