Skip to content

Commit 3452f2b

Browse files
MahdiBMczechboy0
andauthored
Remove no-longer-needed @preconcurrencys (#83)
See apple/swift-openapi-generator#396. --------- Co-authored-by: Honza Dvorsky <[email protected]>
1 parent 3300cc4 commit 3452f2b

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

Sources/OpenAPIRuntime/Conversion/Converter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414
#if canImport(Darwin)
15-
import Foundation
15+
import class Foundation.JSONEncoder
1616
#else
1717
@preconcurrency import class Foundation.JSONEncoder
18-
@preconcurrency import class Foundation.JSONDecoder
1918
#endif
19+
import class Foundation.JSONDecoder
2020

2121
/// Converter between generated and HTTP currency types.
2222
@_spi(Generated) public struct Converter: Sendable {

Sources/OpenAPIRuntime/Errors/ClientError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
import HTTPTypes
1616
#if canImport(Darwin)
17-
import Foundation
17+
import struct Foundation.URL
1818
#else
1919
@preconcurrency import struct Foundation.URL
20-
@preconcurrency import protocol Foundation.LocalizedError
2120
#endif
21+
import protocol Foundation.LocalizedError
2222

2323
/// An error thrown by a client performing an OpenAPI operation.
2424
///

Sources/OpenAPIRuntime/Interface/ClientTransport.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import HTTPTypes
16-
#if canImport(Darwin)
1716
import struct Foundation.URL
18-
#else
19-
@preconcurrency import struct Foundation.URL
20-
#endif
2117

2218
/// A type that performs HTTP operations.
2319
///

Sources/OpenAPIRuntime/Interface/UniversalClient.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414
import HTTPTypes
1515
#if canImport(Darwin)
16-
import Foundation
16+
import struct Foundation.URL
1717
#else
1818
@preconcurrency import struct Foundation.URL
1919
#endif

Sources/OpenAPIRuntime/Interface/UniversalServer.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import HTTPTypes
16-
1716
#if canImport(Darwin)
1817
import struct Foundation.URL
19-
import struct Foundation.URLComponents
2018
#else
2119
@preconcurrency import struct Foundation.URL
22-
@preconcurrency import struct Foundation.URLComponents
2320
#endif
21+
import struct Foundation.URLComponents
2422

2523
/// OpenAPI document-agnostic HTTP server used by OpenAPI document-specific,
2624
/// generated servers to perform request deserialization, middleware and handler

Tests/OpenAPIRuntimeTests/URICoder/Test_URICodingRoundtrip.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414
import XCTest
15-
@_spi(Generated) @testable import OpenAPIRuntime
16-
#if os(Linux)
17-
@preconcurrency import Foundation
15+
#if canImport(Darwin) || swift(>=5.9.1)
16+
import struct Foundation.Date
17+
#else
18+
@preconcurrency import struct Foundation.Date
1819
#endif
20+
@_spi(Generated) @testable import OpenAPIRuntime
1921

2022
final class Test_URICodingRoundtrip: Test_Runtime {
2123

0 commit comments

Comments
 (0)