Skip to content

rustls-cert-gen: fix useless_borrows_in_formatting findings#442

Merged
cpu merged 1 commit into
rustls:mainfrom
cpu:ci/clippy
Jul 17, 2026
Merged

rustls-cert-gen: fix useless_borrows_in_formatting findings#442
cpu merged 1 commit into
rustls:mainfrom
cpu:ci/clippy

Conversation

@cpu

@cpu cpu commented Jul 17, 2026

Copy link
Copy Markdown
Member

Of the form:

error: redundant reference in `write!` argument
   --> rustls-cert-gen/src/cert.rs:282:25
    |
282 |         write!(key_out, "{}", &self.private_key_pem)?;
    |                               ^^^^^^^^^^^^^^^^^^^^^ help: remove the redundant `&`: `self.private_key_pem`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
    = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_borrows_in_formatting)]`

Of the form:

```
error: redundant reference in `write!` argument
   --> rustls-cert-gen/src/cert.rs:282:25
    |
282 |         write!(key_out, "{}", &self.private_key_pem)?;
    |                               ^^^^^^^^^^^^^^^^^^^^^ help: remove the redundant `&`: `self.private_key_pem`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#useless_borrows_in_formatting
    = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_borrows_in_formatting)]`
```
@cpu cpu self-assigned this Jul 17, 2026
@cpu
cpu enabled auto-merge July 17, 2026 18:48
@cpu
cpu added this pull request to the merge queue Jul 17, 2026
Merged via the queue into rustls:main with commit edc6bb6 Jul 17, 2026
17 checks passed
@cpu
cpu deleted the ci/clippy branch July 17, 2026 19:21
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.

2 participants