Repository navigation
chore: satisfy nightly clippy (question_mark, fetch_update) - #1066
Conversation
Two lints surface under a newer/nightly clippy that today's stable doesn't yet flag: - aube-lockfile/src/source.rs: rewrite the trailing `exec:` arm with the `?` operator (clippy::question_mark). Behavior is identical — the function already returns `Option`. - aube/src/progress/mod.rs: `Atomic::fetch_update` is deprecated in Rust 1.99 in favor of `try_update`, but `try_update` is only stable since 1.95 and our MSRV is 1.93, so switching would break `cargo-msrv`. Add a scoped `#[allow(deprecated)]` with a note to swap it once the MSRV clears 1.95. Verified clean under both `cargo clippy` (stable) and `cargo +nightly clippy` with `-D warnings`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 4 minutes 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: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
Greptile SummaryMaintenance-only PR that clears two nightly clippy lints (
Confidence Score: 5/5Safe to merge — both changes are purely mechanical and preserve existing runtime behavior exactly. The source.rs refactor is a direct semantic equivalent: the ? on strip_prefix("exec:") returns None from the function under the same condition as the old else { return None } branch. The progress/mod.rs change adds only a lint suppression attribute with a well-documented rationale and a clear migration path once the MSRV is bumped. No logic changes, no new error paths. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore: satisfy nightly clippy (question_..." | Re-trigger Greptile |
What
Two lints surface under a newer/nightly clippy (0.1.99) that today's stable (0.1.97) doesn't yet flag. This clears both so a
cargo +nightly clippy -- -D warningsrun stays green.clippy::question_mark—crates/aube-lockfile/src/source.rsRewrote the trailing
exec:arm of the source-kind match with the?operator. Behavior is identical — the function already returnsOption, sostrip_prefix("exec:")?returnsNoneexactly where the oldelse { return None }did.deprecated
Atomic::fetch_update—crates/aube/src/progress/mod.rsfetch_updateis#[deprecated(since = "1.99.0")]in favor oftry_update. I did not switch totry_update: it's#[stable(since = "1.95.0")]and this repo's MSRV is 1.93, so the swap would fail thecargo-msrvgate. Instead added a scoped#[allow(deprecated)]with a comment to swap it once MSRV clears 1.95. The deprecation is nightly-only for now, so stable builds are unaffected either way.Verification
cargo clippy --all-targets -- -D warnings(stable 1.97) → exit 0cargo +nightly clippy --all-targets --all-features -- -D warnings(nightly 0.1.99) → exit 0cargo fmt --checkclean;cargo test -p aube-lockfilepasses.Not addressed
A future-incompat warning from transitive deps (
bytecheck,nix,rkyv) is upstream churn, not fixable in this repo.🤖 Generated with Claude Code
Note
Low Risk
Lint-only refactors with documented identical
exec:parse semantics; progress clamp logic unchanged aside from silencing a nightly-only deprecation.Overview
Keeps
cargo +nightly clippy -D warningsgreen with two lint-only tweaks and no intended behavior changes.In
LocalSource::parse, theexec:branch is folded into the finalelsearm usingstrip_prefix("exec:")?, matchingclippy::question_markwhile preserving the sameOptionoutcomes as the old explicitreturn None.In
clamp_reused_to,AtomicUsize::fetch_updateis left in place (MSRV 1.93 blocks switching totry_update, stable since 1.95) and a scoped#[allow(deprecated)]plus an MSRV note documents when to migrate.Reviewed by Cursor Bugbot for commit e80ac67. Bugbot is set up for automated code reviews on this repo. Configure here.