This commit is contained in:
Nikolay Kim 2023-10-02 14:30:19 +06:00
parent 37e3928d40
commit fd9ac5c48e
2 changed files with 8 additions and 9 deletions

View file

@ -126,6 +126,7 @@ mod tests {
use super::*; use super::*;
use ntex_util::future::lazy; use ntex_util::future::lazy;
#[allow(clippy::clone_on_copy)]
#[ntex::test] #[ntex::test]
async fn resolver() { async fn resolver() {
let resolver = Resolver::default().clone(); let resolver = Resolver::default().clone();

View file

@ -139,15 +139,13 @@ mod tests {
}); });
let mut cert_store = RootCertStore::empty(); let mut cert_store = RootCertStore::empty();
cert_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map( cert_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| {
|ta| { OwnedTrustAnchor::from_subject_spki_name_constraints(
OwnedTrustAnchor::from_subject_spki_name_constraints( ta.subject,
ta.subject, ta.spki,
ta.spki, ta.name_constraints,
ta.name_constraints, )
) }));
},
));
let config = ClientConfig::builder() let config = ClientConfig::builder()
.with_safe_defaults() .with_safe_defaults()
.with_root_certificates(cert_store) .with_root_certificates(cert_store)