diff --git a/crates/http-std/src/default_client.rs b/crates/http-std/src/default_client.rs index cdda62ef..e9234c8e 100644 --- a/crates/http-std/src/default_client.rs +++ b/crates/http-std/src/default_client.rs @@ -1,3 +1,4 @@ +use crate::{Client, Error, FetchOptions, Method, Response, Result}; use rustls::pki_types::ServerName; use rustls::{ClientConfig, ClientConnection, RootCertStore, StreamOwned}; use rustls_native_certs::load_native_certs; @@ -7,8 +8,6 @@ use std::net::TcpStream; use std::sync::Arc; use url::Url; -use crate::{Client, Error, FetchOptions, Method, Response, Result}; - struct Destination { pub host: String, pub path: String, @@ -57,7 +56,7 @@ fn transmit(destination: &Destination, request: &[u8]) -> Result> { .with_root_certificates(root_store) .with_no_client_auth(); - let rc_config = Arc::new(config); // Arc allows sharing the config + let rc_config = Arc::new(config); let stream = TcpStream::connect((&destination.host[..], destination.port)) .map_err(|err| Error::Network(format!("failed to connect to host: {}", err)))?;