Skip to content

fix: resolve clippy pedantic warnings across workspace#3009

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

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

Conversation

@olabi
Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Collaborator

@code-yeongyu code-yeongyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has merge conflicts. Please rebase onto main and resolve conflicts.

@code-yeongyu
Copy link
Copy Markdown
Collaborator

Please rebase onto main — this PR has merge conflicts. CI is otherwise being evaluated. Thanks!

olabi and others added 2 commits May 26, 2026 09:02
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>
@olabi olabi force-pushed the fix/clippy-pedantic-warnings branch from 07ff645 to 1887681 Compare May 26, 2026 00:03
@olabi
Copy link
Copy Markdown
Contributor Author

olabi commented May 26, 2026

Hey @code-yeongyu! I've successfully rebased onto main, resolved all conflicts manually. Ready for another look when you have a moment. Thanks!

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