Skip to content

Commit

Permalink
Remove unnecessary comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KendallWeihe committed Sep 24, 2024
1 parent a3ba3ea commit ef63168
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/http-std/src/default_client.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -57,7 +56,7 @@ fn transmit(destination: &Destination, request: &[u8]) -> Result<Vec<u8>> {
.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)))?;
Expand Down

0 comments on commit ef63168

Please sign in to comment.