Skip to content

fix(proofs): drop redundant clone flagged by clippy 1.100 - #234

Merged
panos-xyz merged 1 commit into
mainfrom
fix/clippy-rust-1.100
Nov 24, 2026
Merged

panos-xyz merged 1 commit into
mainfrom
fix/clippy-rust-1.100

Conversation

@panos-xyz

@panos-xyz panos-xyz commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

CI installs the stable toolchain (dtolnay/rust-toolchain@stable), which moved to Rust 1.100.0 after the checks of #231 ran. Clippy on main (c25b9a3) now fails:

error: redundant clone
   --> crates/proofs/src/db/store.rs:405:33
405 |                 cur.append_dup(k.clone(), vv)?;

k is owned by the loop and not used afterwards, so it is moved into append_dup instead of cloned.

The Release branches ruleset requires Clippy to pass on a commit before release/1.5.0 can be created from it, so this blocks the v1.5.0 release branch. The v1.5.0 tag and its binaries are built from c25b9a3; the release branch will be created from this fix, which only differs by this one line.

Notes

  • No behaviour change.
  • Clippy stopped at morph-proofs, so crates that depend on it were not linted with 1.100.0 yet. If CI reports more, they will be fixed in this PR.

Summary by CodeRabbit

  • Refactor
    • Streamlined batch history storage. Existing append behavior and returned results remain unchanged, so no user-facing behavior changes are expected.

CI installs the stable toolchain, which moved to Rust 1.100.0 after the
checks of #231 ran. Its `redundant_clone` lint rejects `k.clone()` in the
append path of `store.rs`: `k` is owned by the loop and not used afterwards,
so it can be moved into `append_dup` directly. The Clippy job on main has
been failing since, and the `release/*` ruleset requires Clippy on a commit
before a release branch can be created from it.

No behaviour change.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository because its GitHub organization is not linked to your Claude organization.

To turn it back on, one person needs both roles: owner of the GitHub organization (or the account owner, for a personal repository) and admin or owner of your Claude organization. If that is not you, pass this on to someone who is.

Open Organization settings, Git providers and click Link next to the GitHub organization's name. If it is not listed, click Enable GitHub integration or Connect your GitHub first, whichever the page shows.

New pull requests are then reviewed as before. To get a review on one that is already open, someone with write access can comment @claude review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

In append mode, persist_history_batch moves each key into append_dup instead of cloning it. Append-mode behavior and returned keys remain unchanged.

Changes: History persistence

Layer / File(s) Summary
Append-mode key handling
crates/proofs/src/db/store.rs
persist_history_batch moves each key into append_dup instead of cloning it. Append-mode behavior and returned keys remain unchanged.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Refactor

Suggested reviewers: dylancai9, curryxbo

Merge Risk: Minimal · up to b4cdb

This removes a redundant clone to satisfy the new Clippy lint, with no behavior change. It is low-risk and unblocks CI for the release branch.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change accurately: it removes a redundant clone in crates/proofs that clippy flagged under Rust 1.100. The raw summary and objectives both confirm that the diff changes k.clone() t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change accurately: it removes a redundant clone in crates/proofs that clippy flagged under Rust 1.100. The raw summary and objectives both confirm that the diff changes k.clone() to a move into append_dup in store.rs, with no behavior change. The title is specific and scoped to the main change, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d78ce89a-0f4b-4641-8006-1d146e919ccc
Commits

Reviewing files that changed from the base of the PR and between c25b9a3 and b4cdbe6.

Files selected for processing: 1

  • crates/proofs/src/db/store.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@panos-xyz
panos-xyz merged commit e01b16a into main Nov 24, 2026
14 checks passed
@panos-xyz
panos-xyz deleted the fix/clippy-rust-1.100 branch November 24, 2026 06:23
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.

4 participants