Skip to content

Pass the combo payload by reference in its checksum test - #595

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/ci-autofix-automation-a653
Draft

Pass the combo payload by reference in its checksum test#595
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/ci-autofix-automation-a653

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Why

clippy on main failed after #502 with -D clippy::redundant_clone in checksummed_combo_is_analysed. json! only borrows the bare combo string, so .clone() is unused and the later checksummed call still needs bare.

What changed

Pass &bare into json! instead of cloning. Test contract is unchanged: bare and checksummed combo(KEY) still analyse to the same getdescriptorinfo result.

Verification

  • cargo clippy -p bitcoin-rs-rpc --all-targets -- -D warnings
  • cargo test -p bitcoin-rs-rpc --lib descriptor_checksum_tests::checksummed_combo_is_analysed
Open in Web View Automation 

#502 left bare.clone() in checksummed_combo_is_analysed. json! only
borrows the String, so clippy::redundant_clone fails -D warnings on
bitcoin-rs-rpc test targets.

Co-authored-by: metaphorics <metaphorics@users.noreply.github.com>
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