Skip to content

Commit a24232c

Browse files
committed
fix: Pass the correct Any type to use_preconfigured_tls
1 parent 08470a7 commit a24232c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/https_helper.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use rustls::{pki_types::InvalidDnsNameError, ClientConfig};
2-
use std::sync::Arc;
32
use thiserror::Error;
43

54
pub use reqwest::Response;
@@ -22,14 +21,14 @@ impl From<Method> for reqwest::Method {
2221
}
2322

2423
pub(crate) async fn https(
25-
client_config: &Arc<ClientConfig>,
24+
client_config: &ClientConfig,
2625
url: impl AsRef<str>,
2726
method: Method,
2827
body: Option<String>,
2928
) -> Result<Response, HttpsRequestError> {
3029
let method: reqwest::Method = method.into();
3130
let client = reqwest::ClientBuilder::new()
32-
.use_preconfigured_tls(Arc::clone(client_config))
31+
.use_preconfigured_tls(client_config.clone())
3332
.build()?;
3433
let mut request = client.request(method, url.as_ref());
3534
if let Some(body) = body {

0 commit comments

Comments
 (0)