fix(consensus): collapse codec masking if into a let-chain - #590
Conversation
The Rust 1.93 toolchain adopted in #575 makes clippy's collapsible_if fire on the nested `if outer_bases_length > 0 { if let Some(outer_qual) = outer_bases_qual }` in mask_consensus_quals_query_based, failing the lint job on main (and every PR rebased onto it). Collapse it into a let-chain, the idiom the newer toolchain unlocks, per the project's policy of adopting new idioms rather than suppressing the lint.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #590 +/- ##
==========================================
- Coverage 92.99% 92.96% -0.04%
==========================================
Files 167 167
Lines 103267 103266 -1
==========================================
- Hits 96034 96000 -34
- Misses 7233 7266 +33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Main's
lintjob is currently failing — commit0ae197c0(#575, the MSRV/let-chain adoption) bumped the toolchain to Rust 1.93, whose clippy now firescollapsible_ifon a pre-existing nestedifinmask_consensus_quals_query_based(crates/fgumi-consensus/src/codec_caller.rs:1315). #575 didn't clean it up, so main and every PR rebased onto it failcargo ci-lint.This collapses the nested
if outer_bases_length > 0 { if let Some(outer_qual) = outer_bases_qual }into a single let-chain — the idiom the newer toolchain unlocks — matching the project policy in CLAUDE.md to adopt new idioms rather than suppress the clippy lints that flag them. Behavior is unchanged.Verification
cargo ci-lint(workspace,-D warnings -W clippy::pedantic) passes clean.