Skip to content

Commit

Permalink
Take impl Into<Arc<CryptoProvider>> in connector builder
Browse files Browse the repository at this point in the history
This allows for calling the methods with Arc<CryptoProvider> in a
backwards-compatible way.

Signed-off-by: Jens Reidel <[email protected]>
  • Loading branch information
Gelbpunkt authored and djc committed Aug 29, 2024
1 parent b4f5132 commit a6a5687
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/connector/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
#[cfg(feature = "rustls-platform-verifier")]
pub fn with_provider_and_platform_verifier(
self,
provider: CryptoProvider,
provider: impl Into<Arc<CryptoProvider>>,
) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
Ok(self.with_tls_config(
ClientConfig::builder_with_provider(provider.into())
Expand Down Expand Up @@ -120,7 +120,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
#[cfg(feature = "rustls-native-certs")]
pub fn with_provider_and_native_roots(
self,
provider: CryptoProvider,
provider: impl Into<Arc<CryptoProvider>>,
) -> std::io::Result<ConnectorBuilder<WantsSchemes>> {
Ok(self.with_tls_config(
ClientConfig::builder_with_provider(provider.into())
Expand Down Expand Up @@ -151,7 +151,7 @@ impl ConnectorBuilder<WantsTlsConfig> {
#[cfg(feature = "webpki-roots")]
pub fn with_provider_and_webpki_roots(
self,
provider: CryptoProvider,
provider: impl Into<Arc<CryptoProvider>>,
) -> Result<ConnectorBuilder<WantsSchemes>, rustls::Error> {
Ok(self.with_tls_config(
ClientConfig::builder_with_provider(provider.into())
Expand Down

0 comments on commit a6a5687

Please sign in to comment.