Skip to content

style(pg-cli): drop useless borrow in decrypt eprintln (clippy) - #231

Merged
rubenhensen merged 1 commit into
mainfrom
fix/cli-clippy-useless-borrow
Jul 10, 2026
Merged

style(pg-cli): drop useless borrow in decrypt eprintln (clippy)#231
rubenhensen merged 1 commit into
mainfrom
fix/cli-clippy-useless-borrow

Conversation

@rubenhensen

Copy link
Copy Markdown
Contributor

Fixes the pre-existing Clippy workspace (cli) failure on main.

cargo clippy --manifest-path pg-cli/Cargo.toml --all-targets --all-features -- -D warnings
(current stable) flags &keyrequest at pg-cli/src/decrypt.rs:88 as
clippy::useless_borrows_in_formatting. Because the clippy matrix uses
fail-fast, this one lint also cancels the core/ffi/pkg shards, so it blocks
every PR from going green — not just this one.

The {:?} formatter borrows its argument internally and keyrequest is still
used on the next line, so removing the & is a no-op behavior change.

Verified locally: the exact CI command now exits 0.

`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.

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@rubenhensen
rubenhensen merged commit bf538a9 into main Jul 10, 2026
25 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 10, 2026
@dobby-coder
dobby-coder Bot deleted the fix/cli-clippy-useless-borrow branch July 27, 2026 20:11
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