Fix clippy 1.97 useless_borrows_in_formatting on main - #158
Merged
spacebear21 merged 1 commit intoAug 21, 2026
Conversation
Clippy 1.97 extended useless_borrows_in_formatting to flag these five borrows, and CI runners now ship stable 1.97.1, so the Lints (stable) job fails on main (see the run on Uniffi-Dart#156, which flags these exact lines without touching them). Verified: clippy 1.98.0 reports five 'redundant reference' errors on main and none with this change. Display for &T forwards to Display for T, so output is byte-identical. The same change rode along in Uniffi-Dart#149, Uniffi-Dart#152, Uniffi-Dart#157 (and was reverted from Uniffi-Dart#150 when it could not be reproduced locally on an outdated toolchain). Landing it once on main lets those branches rebase clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDnKiUL8NDSpeaPvyKJeoR
This was referenced Aug 21, 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.
What
Removes five redundant
&borrows informat!/println!arguments, in four files.Displayfor&Tforwards toDisplayforT, so the output is byte-identical.Why
Clippy 1.97 extended
useless_borrows_in_formattingto cover these, and the CI runners now ship stable 1.97.1.mainlast ran CI in June, so it still shows green — but any freshLints (stable)run fails on these lines. The run on #156 shows this: it flagsenums.rs:39,render/mod.rs:60, andstream/mod.rs:11, none of which that PR touches.Verified locally:
cargo +stable clippy -- -D warnings(clippy 1.98.0) reports fiveredundant referenceerrors onmain, and none with this change.Context
The same change is currently riding along in #149, #152, and #157, and was reverted from #150 after a review discussion in which the failure could not be reproduced (the reproduction attempt used an outdated toolchain — that was my error, corrected on the threads). Landing it once here lets all four branches rebase or drop their copies, and un-reds
mainfor every future PR.🤖 Generated with Claude Code