diff --git a/Sources/AsyncHTTPClient/ConnectionPool.swift b/Sources/AsyncHTTPClient/ConnectionPool.swift index 07605d2d7..291068c55 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool.swift @@ -74,7 +74,7 @@ enum ConnectionPool { var hasher = Hasher() self.tlsConfiguration?.hash(into: &hasher) let hash = hasher.finalize() - var hostDescription = "" + let hostDescription: String switch self.connectionTarget { case .ipAddress(let serialization, let addr): hostDescription = "\(serialization):\(addr.port!)" diff --git a/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift b/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift index 46d119929..7340a59ea 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool/ChannelHandler/HTTP1ProxyConnectHandler.swift @@ -45,10 +45,11 @@ final class HTTP1ProxyConnectHandler: ChannelDuplexHandler, RemovableChannelHand return self.proxyEstablishedPromise?.futureResult } - convenience - init(target: ConnectionTarget, - proxyAuthorization: HTTPClient.Authorization?, - deadline: NIODeadline) { + convenience init( + target: ConnectionTarget, + proxyAuthorization: HTTPClient.Authorization?, + deadline: NIODeadline + ) { let targetHost: String let targetPort: Int switch target {