File tree 2 files changed +13
-4
lines changed
Sources/OpenAPIAsyncHTTPClient
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 15
15
import Foundation
16
16
import PackageDescription
17
17
18
+ // General Swift-settings for all targets.
19
+ let swiftSettings : [ SwiftSetting ] = [
20
+ // https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
21
+ // Require `any` for existential types.
22
+ . enableUpcomingFeature( " ExistentialAny " )
23
+ ]
24
+
18
25
let package = Package (
19
26
name: " swift-openapi-async-http-client " ,
20
27
platforms: [
@@ -39,13 +46,15 @@ let package = Package(
39
46
. product( name: " OpenAPIRuntime " , package : " swift-openapi-runtime " ) ,
40
47
. product( name: " AsyncHTTPClient " , package : " async-http-client " ) ,
41
48
. product( name: " NIOFoundationCompat " , package : " swift-nio " ) ,
42
- ]
49
+ ] ,
50
+ swiftSettings: swiftSettings
43
51
) ,
44
52
. testTarget(
45
53
name: " OpenAPIAsyncHTTPClientTests " ,
46
54
dependencies: [
47
55
" OpenAPIAsyncHTTPClient " ,
48
- ]
56
+ ] ,
57
+ swiftSettings: swiftSettings
49
58
) ,
50
59
]
51
60
)
Original file line number Diff line number Diff line change @@ -115,15 +115,15 @@ public struct AsyncHTTPClientTransport: ClientTransport {
115
115
public var configuration : Configuration
116
116
117
117
/// Underlying request sender for the transport.
118
- internal let requestSender : HTTPRequestSending
118
+ internal let requestSender : any HTTPRequestSending
119
119
120
120
/// Creates a new transport.
121
121
/// - Parameters:
122
122
/// - configuration: A set of configuration values used by the transport.
123
123
/// - requestSender: The underlying request sender.
124
124
internal init (
125
125
configuration: Configuration ,
126
- requestSender: HTTPRequestSending
126
+ requestSender: any HTTPRequestSending
127
127
) {
128
128
self . configuration = configuration
129
129
self . requestSender = requestSender
You can’t perform that action at this time.
0 commit comments