Skip to content

fix: resolve clippy errors in tree-sitter comparison test#15

Merged
mpecan merged 1 commit intomainfrom
fix/clippy-tree-sitter-comparison
Mar 26, 2026
Merged

fix: resolve clippy errors in tree-sitter comparison test#15
mpecan merged 1 commit intomainfrom
fix/clippy-tree-sitter-comparison

Conversation

@mpecan
Copy link
Copy Markdown
Owner

@mpecan mpecan commented Mar 26, 2026

Summary

  • Fix all clippy violations in tests/compare_tree_sitter.rs: unwrap_used, function too long, redundant closure, cast_precision_loss, and const fn suggestions
  • Add tree-sitter comparison test infrastructure (dev-dependencies, justfile target)
  • All 135 tests pass with zero clippy warnings

Test plan

  • just passes (fmt + clippy + tests)
  • just compare-tree-sitter runs successfully

🤖 Generated with Claude Code

Fix all clippy violations in tests/compare_tree_sitter.rs:
- Replace unwrap() with Result return and let-else pattern
- Split compare_parsers (97 lines) under 60-line limit via GrandTotals struct
- Replace redundant closure with Result::ok method reference
- Isolate usize-to-f64 casts in pct() with cast_precision_loss allow
- Mark GrandTotals::new() and add() as const fn

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mpecan mpecan merged commit 26570f9 into main Mar 26, 2026
5 checks passed
@mpecan mpecan deleted the fix/clippy-tree-sitter-comparison branch March 26, 2026 11:41
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.

1 participant