ci.yml installs whatever rustup calls stable and the tree pins no toolchain, so this broke without a commit: useless_borrows_in_formatting now fires on a line that has been in tests/injection.rs since the injection tests were written, and RUSTFLAGS: -D warnings makes it fatal.
The borrow was never doing anything -- {:?} formats String and &String identically -- so the lint is right and this is not a workaround.
Verified locally against the toolchain CI actually resolved to (1.97.1, not the rust-version = "1.85" in Cargo.toml), running all four gates the workflow runs:
Gate
Result
cargo fmt --all -- --check
clean
cargo clippy --all-targets --all-features
clean, no other lint
cargo test --all-features
208 passed, 0 failed
cargo deny check
advisories, bans, licenses, sources ok
Note the earlier red runs on this repo (1113, 1282, 1441) were not this lint -- they were no space left on device on the runner. That is now fixed separately, which is the only reason the job got far enough to compile and surface this.
Separate from this fix, worth a decision: nothing pins the toolchain, so the next stable release can turn this repo red again with no change to the code. A rust-toolchain.toml would close that, at the cost of not seeing new lints until it is bumped. That is a policy call, so it is deliberately not in this PR.
`ci.yml` installs whatever rustup calls stable and the tree pins no toolchain, so this broke without a commit: `useless_borrows_in_formatting` now fires on a line that has been in `tests/injection.rs` since the injection tests were written, and `RUSTFLAGS: -D warnings` makes it fatal.
The borrow was never doing anything -- `{:?}` formats `String` and `&String` identically -- so the lint is right and this is not a workaround.
Verified locally against the toolchain CI actually resolved to (**1.97.1**, not the `rust-version = "1.85"` in Cargo.toml), running all four gates the workflow runs:
| Gate | Result |
|---|---|
| `cargo fmt --all -- --check` | clean |
| `cargo clippy --all-targets --all-features` | clean, no other lint |
| `cargo test --all-features` | 208 passed, 0 failed |
| `cargo deny check` | advisories, bans, licenses, sources ok |
Note the earlier red runs on this repo (1113, 1282, 1441) were **not** this lint -- they were `no space left on device` on the runner. That is now fixed separately, which is the only reason the job got far enough to compile and surface this.
**Separate from this fix, worth a decision:** nothing pins the toolchain, so the next stable release can turn this repo red again with no change to the code. A `rust-toolchain.toml` would close that, at the cost of not seeing new lints until it is bumped. That is a policy call, so it is deliberately not in this PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
error: redundant reference in `assert_eq!` argument
--> tests/injection.rs:633:13
= note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings`
No code changed to cause this. ci.yml installs whatever rustup calls
stable and the tree pins no toolchain, so the gate moved under the
repository: `useless_borrows_in_formatting` fires on a line that has been
there since the injection tests were written, and `RUSTFLAGS: -D
warnings` turns it into a hard failure.
The borrow was never doing anything -- `{:?}` formats a String and a
&String identically -- so this is the lint being right, not a workaround
for it.
Verified against the toolchain CI actually resolved to (1.97.1, not the
1.85 in Cargo.toml's rust-version), all four gates the workflow runs:
fmt clean, clippy --all-targets --all-features clean with no other lint,
208 tests passing, and cargo deny reporting advisories/bans/licenses/
sources ok.
Worth separating from this fix: the failure was invisible until it
happened because the toolchain floats. Nothing here pins it, so the next
stable release can turn this repository red without a commit. A
rust-toolchain.toml would close that, at the cost of not seeing new lints
until it is bumped -- a policy call, not a bug fix, so it is not in here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
ci.ymlinstalls whatever rustup calls stable and the tree pins no toolchain, so this broke without a commit:useless_borrows_in_formattingnow fires on a line that has been intests/injection.rssince the injection tests were written, andRUSTFLAGS: -D warningsmakes it fatal.The borrow was never doing anything --
{:?}formatsStringand&Stringidentically -- so the lint is right and this is not a workaround.Verified locally against the toolchain CI actually resolved to (1.97.1, not the
rust-version = "1.85"in Cargo.toml), running all four gates the workflow runs:cargo fmt --all -- --checkcargo clippy --all-targets --all-featurescargo test --all-featurescargo deny checkNote the earlier red runs on this repo (1113, 1282, 1441) were not this lint -- they were
no space left on deviceon the runner. That is now fixed separately, which is the only reason the job got far enough to compile and surface this.Separate from this fix, worth a decision: nothing pins the toolchain, so the next stable release can turn this repo red again with no change to the code. A
rust-toolchain.tomlwould close that, at the cost of not seeing new lints until it is bumped. That is a policy call, so it is deliberately not in this PR.🤖 Generated with Claude Code
error: redundant reference in `assert_eq!` argument --> tests/injection.rs:633:13 = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings` No code changed to cause this. ci.yml installs whatever rustup calls stable and the tree pins no toolchain, so the gate moved under the repository: `useless_borrows_in_formatting` fires on a line that has been there since the injection tests were written, and `RUSTFLAGS: -D warnings` turns it into a hard failure. The borrow was never doing anything -- `{:?}` formats a String and a &String identically -- so this is the lint being right, not a workaround for it. Verified against the toolchain CI actually resolved to (1.97.1, not the 1.85 in Cargo.toml's rust-version), all four gates the workflow runs: fmt clean, clippy --all-targets --all-features clean with no other lint, 208 tests passing, and cargo deny reporting advisories/bans/licenses/ sources ok. Worth separating from this fix: the failure was invisible until it happened because the toolchain floats. Nothing here pins it, so the next stable release can turn this repository red without a commit. A rust-toolchain.toml would close that, at the cost of not seeing new lints until it is bumped -- a policy call, not a bug fix, so it is not in here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>