diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2021-11-05 19:04:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-05 07:04:54 -0400 |
| commit | ad4ca39f0487cd07b70d7499bf4107a8195431fe (patch) | |
| tree | aca5b4404920cfc33eb670f1616254ecda0f801a /src/rust | |
| parent | eb4ed0529198ad63834fa9e3fa23a62d6ff08aea (diff) | |
| download | cryptography-ad4ca39f0487cd07b70d7499bf4107a8195431fe.tar.gz | |
fix nightly clippy warnings (#6552)
oid implements the Display trait so to_string is redundant when passing
to format!
Diffstat (limited to 'src/rust')
| -rw-r--r-- | src/rust/src/x509/certificate.rs | 2 | ||||
| -rw-r--r-- | src/rust/src/x509/csr.rs | 2 | ||||
| -rw-r--r-- | src/rust/src/x509/ocsp_resp.rs | 5 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/rust/src/x509/certificate.rs b/src/rust/src/x509/certificate.rs index 99bd2d318..8a9454ace 100644 --- a/src/rust/src/x509/certificate.rs +++ b/src/rust/src/x509/certificate.rs @@ -281,7 +281,7 @@ impl Certificate { "UnsupportedAlgorithm", (format!( "Signature algorithm OID: {} not recognized", - self.raw.borrow_value().signature_alg.oid.to_string() + self.raw.borrow_value().signature_alg.oid ),), )?, ))), diff --git a/src/rust/src/x509/csr.rs b/src/rust/src/x509/csr.rs index 769a80061..b681c4741 100644 --- a/src/rust/src/x509/csr.rs +++ b/src/rust/src/x509/csr.rs @@ -157,7 +157,7 @@ impl CertificateSigningRequest { "UnsupportedAlgorithm", (format!( "Signature algorithm OID: {} not recognized", - self.raw.borrow_value().signature_alg.oid.to_string() + self.raw.borrow_value().signature_alg.oid ),), )?, ))), diff --git a/src/rust/src/x509/ocsp_resp.rs b/src/rust/src/x509/ocsp_resp.rs index 0b7431ed5..e4009eeb5 100644 --- a/src/rust/src/x509/ocsp_resp.rs +++ b/src/rust/src/x509/ocsp_resp.rs @@ -177,10 +177,7 @@ impl OCSPResponse { Err(_) => { let exc_messsage = format!( "Signature algorithm OID: {} not recognized", - self.requires_successful_response()? - .signature_algorithm - .oid - .to_string() + self.requires_successful_response()?.signature_algorithm.oid ); Err(PyAsn1Error::from(pyo3::PyErr::from_instance( py.import("cryptography.exceptions")? |
