Skip to content

fix: resolve clippy pedantic warnings across workspace#3009

Open
olabi wants to merge 3 commits into
ultraworkers:mainfrom
olabi:fix/clippy-pedantic-warnings
Open

fix: resolve clippy pedantic warnings across workspace#3009
olabi wants to merge 3 commits into
ultraworkers:mainfrom
olabi:fix/clippy-pedantic-warnings

Conversation

@olabi
Copy link
Copy Markdown

@olabi olabi commented May 9, 2026

Summary

  • Apply clippy::pedantic fixes across 10 files in the workspace
  • Patterns fixed: map().unwrap_or()map_or()/is_ok_and(), match_same_arms, collapsible_match, unnested_or_patterns, doc_markdown, useless_format, unnecessary_lazy_evaluations, redundant_closure
  • All changes are mechanical lint fixes with zero behavioral impact

Files changed

  • crates/api/src/providers/anthropic.rsmap_or, collapsed nested if into match guard
  • crates/api/src/providers/openai_compat.rsmap_or, doc markdown, merged match arms
  • crates/api/src/providers/mod.rsmap_or
  • crates/mock-anthropic-service/src/lib.rs — removed redundant match arm
  • crates/plugins/src/hooks.rs — removed unused import
  • crates/runtime/src/compact.rs — merged match arms
  • crates/runtime/src/hooks.rs — removed unnecessary mut
  • crates/runtime/src/sandbox.rsis_ok_and
  • crates/tools/src/lib.rsis_ok_and (×2)
  • crates/rusty-claude-cli/src/main.rs — doc markdown, useless_format, unnecessary_lazy_evaluations, unnested_or_patterns, redundant_closure, is_ok_and (×3)

Test plan

  • cargo check --workspace passes
  • No behavioral changes — all fixes are mechanical lint cleanups
  • CI should pass (fmt, clippy, test)

🤖 Generated with Claude Code

olabi and others added 3 commits May 9, 2026 13:10
Address clippy::pedantic and clippy::all warnings without changing
any public API or runtime behavior:

- map().unwrap_or() → map_or() / is_ok_and()  (8 instances)
- match_same_arms: merge identical match arms  (3 instances)
- collapsible_match / unnested_or_patterns → if let  (1 instance)
- doc_markdown: backtick-wrap identifiers in doc comments  (5 instances)
- useless_format: format!(literal) → literal.to_string()  (1 instance)
- unnecessary_lazy_evaluations  (1 instance)
- redundant_closure  (1 instance)
- redundant match arm subsumed by wildcard  (1 instance)
- unused import  (1 instance)
- unnecessary mut  (1 instance)
- collapsible nested if into match guard  (1 instance)

Remaining warnings (intentionally skipped) involve signature
changes (unnecessary_wraps), large enum refactoring
(result_large_err), function splitting (too_many_lines),
MSRV concerns (duration_suboptimal_units), or private-module
method references (redundant_closure on runtime::json).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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