Skip to content

Commit a6a5687

Browse files
Gelbpunktdjc
authored andcommitted
Take impl Into<Arc<CryptoProvider>> in connector builder
This allows for calling the methods with Arc<CryptoProvider> in a backwards-compatible way. Signed-off-by: Jens Reidel <[email protected]>
1 parent b4f5132 commit a6a5687

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/connector/builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
8787
#[cfg(feature = "rustls-platform-verifier")]
8888
pub fn with_provider_and_platform_verifier(
8989
self,
90-
provider: CryptoProvider,
90+
provider: impl Into<Arc<CryptoProvider>>,
9191
) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
9292
Ok(self.with_tls_config(
9393
ClientConfig::builder_with_provider(provider.into())
@@ -120,7 +120,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
120120
#[cfg(feature = "rustls-native-certs")]
121121
pub fn with_provider_and_native_roots(
122122
self,
123-
provider: CryptoProvider,
123+
provider: impl Into<Arc<CryptoProvider>>,
124124
) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
125125
Ok(self.with_tls_config(
126126
ClientConfig::builder_with_provider(provider.into())
@@ -151,7 +151,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
151151
#[cfg(feature = "webpki-roots")]
152152
pub fn with_provider_and_webpki_roots(
153153
self,
154-
provider: CryptoProvider,
154+
provider: impl Into<Arc<CryptoProvider>>,
155155
) -> Result<ConnectorBuilder<WantsSchemes>, rustls::Error> {
156156
Ok(self.with_tls_config(
157157
ClientConfig::builder_with_provider(provider.into())

0 commit comments

Comments
 (0)