refactor: Decompose next_occurrence into per-recurrence functions#135
refactor: Decompose next_occurrence into per-recurrence functions#1352witstudios merged 1 commit intomainfrom
Conversation
Split monolithic match with 6 inline date-math arms into focused functions (next_daily_occurrence, next_weekly_occurrence, etc.) and extract shared naive_at_base_time helper. Reduces per-function Cx while preserving exact date math behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
next_occurrencematch with 6 inline date-math arms into focused functions (next_daily_occurrence,next_weekly_occurrence, etc.)naive_at_base_timehelper eliminating 3 identicaland_hms_optblocksnext_occurrenceis now a 6-line dispatcherBaseline (from churn analysis)
Test plan
cargo test— existing schedule tests validate all recurrence typesnpx aidd churnto compare metrics🤖 Generated with Claude Code