Skip to content

Commit 97deae3

Browse files
committed
fix: not autofixable clippy lint from rust 1.87.0
1 parent 7115e56 commit 97deae3

File tree

1 file changed

+7
-5
lines changed
  • mithril-client/src/certificate_client

1 file changed

+7
-5
lines changed

mithril-client/src/certificate_client/verify.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl MithrilCertificateVerifier {
124124
}))
125125
} else {
126126
let certificate = match certificate {
127-
CertificateToVerify::Downloaded { certificate } => certificate,
127+
CertificateToVerify::Downloaded { certificate } => *certificate,
128128
CertificateToVerify::ToDownload { hash } => {
129129
self.retriever.get_certificate_details(&hash).await?
130130
}
@@ -170,7 +170,7 @@ impl MithrilCertificateVerifier {
170170

171171
enum CertificateToVerify {
172172
/// The certificate is already downloaded.
173-
Downloaded { certificate: Certificate },
173+
Downloaded { certificate: Box<Certificate> },
174174
/// The certificate is not downloaded yet (since its parent was cached).
175175
ToDownload { hash: String },
176176
}
@@ -186,7 +186,9 @@ impl CertificateToVerify {
186186

187187
impl From<Certificate> for CertificateToVerify {
188188
fn from(value: Certificate) -> Self {
189-
Self::Downloaded { certificate: value }
189+
Self::Downloaded {
190+
certificate: Box::new(value),
191+
}
190192
}
191193
}
192194

@@ -375,7 +377,7 @@ mod tests {
375377
.verify_with_cache_enabled(
376378
"certificate_chain_validation_id",
377379
CertificateToVerify::Downloaded {
378-
certificate: genesis_certificate.clone(),
380+
certificate: Box::new(genesis_certificate.clone()),
379381
},
380382
)
381383
.await
@@ -411,7 +413,7 @@ mod tests {
411413
.verify_with_cache_enabled(
412414
"certificate_chain_validation_id",
413415
CertificateToVerify::Downloaded {
414-
certificate: certificate.clone(),
416+
certificate: Box::new(certificate.clone()),
415417
},
416418
)
417419
.await

0 commit comments

Comments
 (0)