Skip to content

Commit 866a69e

Browse files
committed
Removed further now unused code
1 parent 8522936 commit 866a69e

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

Diff for: Sources/AsyncHTTPClient/HTTPClient.swift

-35
Original file line numberDiff line numberDiff line change
@@ -578,28 +578,6 @@ public class HTTPClient {
578578
return task
579579
}
580580

581-
private func resolve(timeout: TimeAmount?, deadline: NIODeadline?) -> TimeAmount? {
582-
switch (timeout, deadline) {
583-
case (.some(let timeout), .some(let deadline)):
584-
return min(timeout, deadline - .now())
585-
case (.some(let timeout), .none):
586-
return timeout
587-
case (.none, .some(let deadline)):
588-
return deadline - .now()
589-
case (.none, .none):
590-
return nil
591-
}
592-
}
593-
594-
static func resolveAddress(host: String, port: Int, proxy: Configuration.Proxy?) -> (host: String, port: Int) {
595-
switch proxy {
596-
case .none:
597-
return (host, port)
598-
case .some(let proxy):
599-
return (proxy.host, proxy.port)
600-
}
601-
}
602-
603581
/// `HTTPClient` configuration.
604582
public struct Configuration {
605583
/// TLS configuration, defaults to `TLSConfiguration.makeClientConfiguration()`.
@@ -760,19 +738,6 @@ public class HTTPClient {
760738
public static func delegateAndChannel(on eventLoop: EventLoop) -> EventLoopPreference {
761739
return EventLoopPreference(.delegateAndChannel(on: eventLoop))
762740
}
763-
764-
var bestEventLoop: EventLoop? {
765-
switch self.preference {
766-
case .delegate(on: let el):
767-
return el
768-
case .delegateAndChannel(on: let el):
769-
return el
770-
case .testOnly_exact(channelOn: let el, delegateOn: _):
771-
return el
772-
case .indifferent:
773-
return nil
774-
}
775-
}
776741
}
777742

778743
/// Specifies decompression settings.

0 commit comments

Comments
 (0)