Repository navigation
Pin rust-toolchain to 1.97.1 and fix 8 clippy useless_borrows_in_formatting sites - #230
Merged
Merged
Conversation
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI has been red since stable moved past the last green run (2026-04-30), and nothing in this repo changed to cause it. There is no
rust-toolchain.toml, and the CI action leaves itstoolchaininput unset, so every run floats on whatever stable is current.clippy::useless_borrows_in_formattingwas not firing in April; it now fails the-D warningsclippy job at 8 sites.This is the first of a series of cleanup PRs, and it has to come first: until CI is green, no later PR's CI result means anything.
What
Fix the 8 lint sites. All are redundant
&in formatting macros — no behaviour change, applied withcargo clippy --fix:src/common.rswrite!src/taproot.rsprintln!src/state_machine/coordinator/mod.rsassert_eq!,panic!The
parties, &bad_partiescomparison incoordinator/mod.rsis deliberately untouched — that&is a real reference, not a formatting argument.Pin the toolchain, so a future stable release cannot turn CI red without a code change. Bumping the pin becomes a deliberate PR that fixes the newer lints alongside it, instead of a surprise red build on an unrelated change.
profile = "minimal"matters: the action's file-driven branch runsrustup toolchain installwith no--profile, so without it every job also pullsrust-docs.Why 1.97.1 and not 1.100.0
Deliberate. 1.97.1 is the toolchain these 8 fixes were verified against, and suppressing only that one lint yields a clean run — so the set is provably complete, with nothing hidden behind the compile abort. Current stable is 1.100.0, three minor releases further on, whose newer lints have not been evaluated. Bumping to it is a follow-up PR where the new lints can be reviewed on their own.
Note on CI actions
This PR needs no workflow changes. The existing
stacks-sbtc/actions/setup-rust-toolchainshim wrapsactions-rust-lang/setup-rust-toolchain@v1.15.2, which already honoursrust-toolchain.tomlwhenever itstoolchaininput is empty — which it is. So CI goes green immediately, and migrating off those actions stays a separate PR.Verification
All run under the pinned 1.97.1:
cargo fmt --all -- --check— cleancargo clippy --all-targets --all-features -- -D warnings -A clippy::op-ref -A clippy::needless-range-loop(the exact CI line) — passes; failed before this changecargo test— 88 passedcargo test --features with_v1— 164 passedcargo build --all-features— cleanTest counts are unchanged from
5d0e698, as a behaviour-neutral change requires.🤖 Generated with Claude Code