diff --git a/ntex-connect/src/resolve.rs b/ntex-connect/src/resolve.rs index 25810fe4..fe08bbb2 100644 --- a/ntex-connect/src/resolve.rs +++ b/ntex-connect/src/resolve.rs @@ -126,6 +126,7 @@ mod tests { use super::*; use ntex_util::future::lazy; + #[allow(clippy::clone_on_copy)] #[ntex::test] async fn resolver() { let resolver = Resolver::default().clone(); diff --git a/ntex-connect/src/rustls.rs b/ntex-connect/src/rustls.rs index 3771dcf7..90144afe 100644 --- a/ntex-connect/src/rustls.rs +++ b/ntex-connect/src/rustls.rs @@ -139,15 +139,13 @@ mod tests { }); let mut cert_store = RootCertStore::empty(); - cert_store.add_server_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.0.iter().map( - |ta| { - OwnedTrustAnchor::from_subject_spki_name_constraints( - ta.subject, - ta.spki, - ta.name_constraints, - ) - }, - )); + cert_store.add_trust_anchors(webpki_roots::TLS_SERVER_ROOTS.iter().map(|ta| { + OwnedTrustAnchor::from_subject_spki_name_constraints( + ta.subject, + ta.spki, + ta.name_constraints, + ) + })); let config = ClientConfig::builder() .with_safe_defaults() .with_root_certificates(cert_store)