style(pg-cli): drop useless borrow in decrypt eprintln (clippy) - #231
Merged
Conversation
`cargo clippy --all-features` on current stable flags `&keyrequest` in the
eprintln as clippy::useless_borrows_in_formatting, failing the Clippy workspace
(cli) CI job on main (and fail-fast-canceling the other clippy shards). The
{:?} formatter borrows internally and keyrequest is still used afterwards, so
dropping the & is a no-op behavior change.
Contributor
There was a problem hiding this comment.
✅ Dobby reviewed — clean. Approving.
Trivial, behaviour-preserving fix: removes the useless & from eprintln!("... {:?}", &keyrequest) at pg-cli/src/decrypt.rs, resolving clippy::useless_borrows_in_formatting. The {:?} formatter borrows internally and keyrequest is still used by reference on the next line, so runtime behaviour is unchanged. This unblocks the fail-fast clippy matrix (cli/core/ffi/pkg shards).
Checks:
- 6/6 rule checks compliant (conventional title
style(pg-cli):, cargo-fmt unaffected, refactor test exception applies, PR body justified by non-obvious fail-fast context, ready-not-draft, non-empty real change). - Review findings: none.
- Verified: pg-cli tests pass (7 passed, 0 failed); the exact CI clippy command exits 0 post-change.
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.
Fixes the pre-existing
Clippy workspace (cli)failure onmain.cargo clippy --manifest-path pg-cli/Cargo.toml --all-targets --all-features -- -D warnings(current stable) flags
&keyrequestatpg-cli/src/decrypt.rs:88asclippy::useless_borrows_in_formatting. Because the clippy matrix usesfail-fast, this one lint also cancels the
core/ffi/pkgshards, so it blocksevery PR from going green — not just this one.
The
{:?}formatter borrows its argument internally andkeyrequestis stillused on the next line, so removing the
&is a no-op behavior change.Verified locally: the exact CI command now exits 0.