Skip to content

Commit

Permalink
no constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Apr 9, 2024
1 parent f46a93b commit e54d77a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ where
force_https: false,
http,
tls_config: cfg.into(),
server_name_resolver: Arc::new(DefaultServerNameResolver::new()),
server_name_resolver: Arc::new(DefaultServerNameResolver::default()),
}
}
}
Expand All @@ -138,13 +138,6 @@ impl<T> fmt::Debug for HttpsConnector<T> {
#[derive(Default)]
pub struct DefaultServerNameResolver(());

impl DefaultServerNameResolver {
/// Creates a new resolver.
pub fn new() -> Self {
Self::default()
}
}

impl ResolveServerName for DefaultServerNameResolver {
fn resolve(
&self,
Expand Down
2 changes: 1 addition & 1 deletion src/connector/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl WantsProtocols1 {
tls_config: std::sync::Arc::new(self.tls_config),
server_name_resolver: self
.server_name_resolver
.unwrap_or_else(|| Arc::new(DefaultServerNameResolver::new())),
.unwrap_or_else(|| Arc::new(DefaultServerNameResolver::default())),
}
}

Expand Down

0 comments on commit e54d77a

Please sign in to comment.