Skip to content

Commit edc6bb6

Browse files
committed
rustls-cert-gen: fix useless_borrows_in_formatting findings
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)]` ```
1 parent 86ae909 commit edc6bb6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rustls-cert-gen/src/cert.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,11 @@ impl PemCertifiedKey {
279279

280280
let key_path = dir.join(format!("{name}.key.pem"));
281281
let mut key_out = File::create(key_path)?;
282-
write!(key_out, "{}", &self.private_key_pem)?;
282+
write!(key_out, "{}", self.private_key_pem)?;
283283

284284
let cert_path = dir.join(format!("{name}.pem"));
285285
let mut cert_out = File::create(cert_path)?;
286-
write!(cert_out, "{}", &self.cert_pem)?;
286+
write!(cert_out, "{}", self.cert_pem)?;
287287

288288
Ok(())
289289
}

0 commit comments

Comments
 (0)