Skip to content

refactor: Use idiomatic let...else and remove redundant closures#103

Open
2witstudios wants to merge 1 commit intomainfrom
pu/improve-1
Open

refactor: Use idiomatic let...else and remove redundant closures#103
2witstudios wants to merge 1 commit intomainfrom
pu/improve-1

Conversation

@2witstudios
Copy link
Owner

Summary

  • Replace match + early-return patterns with let...else in 7 locations across pu-core and pu-engine
  • Replace redundant closures with method references (String::is_empty, ToString::to_string, IntoInnerError::into_error)
  • No behavioral changes — pure idiomatic Rust modernization

Test plan

  • cargo clippy --all-targets passes clean
  • cargo test --workspace — all 405 tests pass
  • cargo fmt --all — no formatting issues

🤖 Generated with Claude Code

Replace match-based early returns with let...else across scan_dir functions
and engine request handlers. Replace redundant closures with method references
(String::is_empty, ToString::to_string, IntoInnerError::into_error).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

Warning

Rate limit exceeded

@2witstudios has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c07d7b26-230b-421e-8a51-4221875cfefe

📥 Commits

Reviewing files that changed from the base of the PR and between 55aa882 and ed991c8.

📒 Files selected for processing (6)
  • crates/pu-core/src/agent_def.rs
  • crates/pu-core/src/manifest.rs
  • crates/pu-core/src/schedule_def.rs
  • crates/pu-core/src/swarm_def.rs
  • crates/pu-core/src/template.rs
  • crates/pu-engine/src/engine.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pu/improve-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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