Skip to content

chore: satisfy nightly clippy (question_mark, fetch_update) - #1066

Merged
jdx merged 1 commit into
mainfrom
claude/nightly-clippy-fixes
Jul 20, 2026
Merged

jdx merged 1 commit into
mainfrom
claude/nightly-clippy-fixes

Conversation

@jdx

@jdx jdx commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

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 warnings run stays green.

clippy::question_mark — crates/aube-lockfile/src/source.rs

Rewrote the trailing exec: arm of the source-kind match with the ? operator. Behavior is identical — the function already returns Option, so strip_prefix("exec:")? returns None exactly where the old else { return None } did.

deprecated Atomic::fetch_update — crates/aube/src/progress/mod.rs

fetch_update is #[deprecated(since = "1.99.0")] in favor of try_update. I did not switch to try_update: it's #[stable(since = "1.95.0")] and this repo's MSRV is 1.93, so the swap would fail the cargo-msrv gate. 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 0
  • cargo +nightly clippy --all-targets --all-features -- -D warnings (nightly 0.1.99) → exit 0
  • cargo fmt --check clean; cargo test -p aube-lockfile passes.

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 warnings green with two lint-only tweaks and no intended behavior changes.

In LocalSource::parse, the exec: branch is folded into the final else arm using strip_prefix("exec:")?, matching clippy::question_mark while preserving the same Option outcomes as the old explicit return None.

In clamp_reused_to, AtomicUsize::fetch_update is left in place (MSRV 1.93 blocks switching to try_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.

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>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jdx, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: afdcd0a8-9c1b-43af-92ea-ef3b16f8f0b8

📥 Commits

Reviewing files that changed from the base of the PR and between b73cc20 and e80ac67.

📒 Files selected for processing (2)
  • crates/aube-lockfile/src/source.rs
  • crates/aube/src/progress/mod.rs

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.

@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Maintenance-only PR that clears two nightly clippy lints (clippy::question_mark and the nightly-only fetch_update deprecation) without altering runtime behavior.

  • source.rs: The trailing exec: if-else arm is rewritten using the ? operator; the short-circuit None path is identical to the previous else { return None }.
  • progress/mod.rs: A scoped #[allow(deprecated)] with a clear MSRV comment is added around fetch_update. Switching to try_update (stable since 1.95) is correctly deferred because the project MSRV is 1.93.

Confidence Score: 5/5

Safe 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

Filename Overview
crates/aube-lockfile/src/source.rs Refactored trailing exec: arm of if-else chain to use ? operator — behavior is identical, clippy::question_mark lint satisfied
crates/aube/src/progress/mod.rs Added scoped #[allow(deprecated)] with explanatory comment to suppress nightly-only fetch_update deprecation until MSRV clears 1.95

Reviews (1): Last reviewed commit: "chore: satisfy nightly clippy (question_..." | Re-trigger Greptile

@jdx
jdx enabled auto-merge (squash) July 20, 2026 21:34
@jdx
jdx merged commit 581c922 into main Jul 20, 2026
17 of 18 checks passed
@jdx
jdx deleted the claude/nightly-clippy-fixes branch July 20, 2026 21:37
@cursor cursor Bot mentioned this pull request Jul 20, 2026
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