From a1b04ddebcc04c99ecdb934efba16b4bb4d0fc74 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 25 Oct 2024 09:55:27 +0200 Subject: [PATCH] Rename domain to server_name --- src/client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client.rs b/src/client.rs index 4a13e4c..614c6d8 100644 --- a/src/client.rs +++ b/src/client.rs @@ -229,7 +229,7 @@ mod rustls_connector { pub struct RustlsConnector { inner: TlsConnector, - domain: ServerName<'static>, + server_name: ServerName<'static>, server: (String, u16), } @@ -261,7 +261,7 @@ mod rustls_connector { None => builder.with_no_client_auth(), }; - let domain = ServerName::try_from(server.0.as_str()) + let server_name = ServerName::try_from(server.0.as_str()) .map_err(|_| { io::Error::new( io::ErrorKind::InvalidInput, @@ -272,7 +272,7 @@ mod rustls_connector { Ok(Self { inner: TlsConnector::from(Arc::new(config)), - domain, + server_name, server, }) } @@ -295,7 +295,7 @@ mod rustls_connector { }; let stream = TcpStream::connect(addr).await?; - let future = self.inner.connect(self.domain.clone(), stream); + let future = self.inner.connect(self.server_name.clone(), stream); connection::timeout(timeout, future).await } }