From a6a5687ff79330388ff84694b67a7eed6b4e5c51 Mon Sep 17 00:00:00 2001 From: Jens Reidel Date: Thu, 29 Aug 2024 00:36:28 +0200 Subject: [PATCH] Take impl Into> in connector builder This allows for calling the methods with Arc in a backwards-compatible way. Signed-off-by: Jens Reidel --- src/connector/builder.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connector/builder.rs b/src/connector/builder.rs index d0167f8..2e47df8 100644 --- a/src/connector/builder.rs +++ b/src/connector/builder.rs @@ -87,7 +87,7 @@ impl ConnectorBuilder { #[cfg(feature = "rustls-platform-verifier")] pub fn with_provider_and_platform_verifier( self, - provider: CryptoProvider, + provider: impl Into>, ) -> std::io::Result> { Ok(self.with_tls_config( ClientConfig::builder_with_provider(provider.into()) @@ -120,7 +120,7 @@ impl ConnectorBuilder { #[cfg(feature = "rustls-native-certs")] pub fn with_provider_and_native_roots( self, - provider: CryptoProvider, + provider: impl Into>, ) -> std::io::Result> { Ok(self.with_tls_config( ClientConfig::builder_with_provider(provider.into()) @@ -151,7 +151,7 @@ impl ConnectorBuilder { #[cfg(feature = "webpki-roots")] pub fn with_provider_and_webpki_roots( self, - provider: CryptoProvider, + provider: impl Into>, ) -> Result, rustls::Error> { Ok(self.with_tls_config( ClientConfig::builder_with_provider(provider.into())