From b0689b65200e90fd402c761e5d96fed5c537a775 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Tue, 1 Jun 2021 14:13:04 +0300 Subject: [PATCH] feat: make tokio-rustls-native-certs preferred, disallow enabling both at the same time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastian Dröge --- src/tokio/rustls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokio/rustls.rs b/src/tokio/rustls.rs index 0da5fda..4191579 100644 --- a/src/tokio/rustls.rs +++ b/src/tokio/rustls.rs @@ -41,7 +41,7 @@ where config.root_store = rustls_native_certs::load_native_certs().map_err(|(_, err)| err)?; } - #[cfg(feature = "tokio-rustls-webpki-roots")] + #[cfg(all(feature = "tokio-rustls-webpki-roots", not(feature = "tokio-rustls-native-certs"))] config .root_store .add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);