Skip to content

Full compatibility with the "ExistentialAny" upcoming feature #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
import Foundation
import PackageDescription

// General Swift-settings for all targets.
let swiftSettings: [SwiftSetting] = [
// https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
// Require `any` for existential types.
.enableUpcomingFeature("ExistentialAny")
]

let package = Package(
name: "swift-openapi-async-http-client",
platforms: [
Expand All @@ -39,13 +46,15 @@ let package = Package(
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "AsyncHTTPClient", package: "async-http-client"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
]
],
swiftSettings: swiftSettings
),
.testTarget(
name: "OpenAPIAsyncHTTPClientTests",
dependencies: [
"OpenAPIAsyncHTTPClient",
]
],
swiftSettings: swiftSettings
),
]
)
4 changes: 2 additions & 2 deletions Sources/OpenAPIAsyncHTTPClient/AsyncHTTPClientTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ public struct AsyncHTTPClientTransport: ClientTransport {
public var configuration: Configuration

/// Underlying request sender for the transport.
internal let requestSender: HTTPRequestSending
internal let requestSender: any HTTPRequestSending

/// Creates a new transport.
/// - Parameters:
/// - configuration: A set of configuration values used by the transport.
/// - requestSender: The underlying request sender.
internal init(
configuration: Configuration,
requestSender: HTTPRequestSending
requestSender: any HTTPRequestSending
) {
self.configuration = configuration
self.requestSender = requestSender
Expand Down