File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Sources/AsyncHTTPClient/ConnectionPool/State Machine Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -69,23 +69,6 @@ extension HTTPConnectionPool {
69
69
70
70
enum HTTPVersionState {
71
71
case http1( HTTP1StateMachine )
72
- case http2( HTTP2StateMachine )
73
-
74
- mutating func modify< ReturnValue> (
75
- http1: ( inout HTTP1StateMachine ) -> ReturnValue ,
76
- http2: ( inout HTTP2StateMachine ) -> ReturnValue
77
- ) -> ReturnValue {
78
- let returnValue : ReturnValue
79
- switch self {
80
- case . http1( var http1State) :
81
- returnValue = http1 ( & http1State)
82
- self = . http1( http1State)
83
- case . http2( var http2State) :
84
- returnValue = http2 ( & http2State)
85
- self = . http2( http2State)
86
- }
87
- return returnValue
88
- }
89
72
}
90
73
91
74
var state : HTTPVersionState
@@ -239,6 +222,10 @@ extension HTTPConnectionPool.StateMachine: CustomStringConvertible {
239
222
switch self . state {
240
223
case . http1( let http1) :
241
224
return " .http1( \( http1) ) "
225
+ }
226
+ }
227
+ }
228
+
242
229
extension HTTPConnectionPool . StateMachine {
243
230
struct ConnectionMigrationAction {
244
231
var closeConnections : [ HTTPConnectionPool . Connection ]
You can’t perform that action at this time.
0 commit comments