Skip to content

Commit 1ec85f3

Browse files
author
Emil Karimov
committed
fix: resolve Swift 6.0 strict concurrency and deprecation warnings
- Updated Package.swift: replaced deprecated swiftLanguageVersions with swiftLanguageModes - Added Sendable conformance to StatusCodeResponse and EmptyResponse to fix strict concurrency errors - Fixed unused variable warning in HighCoverageTests.swift - All tests pass (115 tests) - Build completes without errors or warnings
1 parent dc7b1d6 commit 1ec85f3

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ let package = Package(
2323
dependencies: ["EKNetwork"]
2424
),
2525
],
26-
swiftLanguageVersions: [.v6]
26+
swiftLanguageModes: [.v6]
2727
)

Sources/EKNetwork/NetworkManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public struct HTTPError: LocalizedError {
213213
}
214214

215215
/// Convenience response that only exposes the HTTP status code and headers.
216-
public struct StatusCodeResponse: Decodable, Equatable {
216+
public struct StatusCodeResponse: Decodable, Equatable, Sendable {
217217
public let statusCode: Int
218218
public let headers: [String: String]
219219

@@ -235,7 +235,7 @@ public struct StatusCodeResponse: Decodable, Equatable {
235235
}
236236

237237
/// Represents an empty payload. Useful for endpoints that only signal success via status code.
238-
public struct EmptyResponse: Decodable, Equatable {
238+
public struct EmptyResponse: Decodable, Equatable, Sendable {
239239
public init() {}
240240
}
241241

Tests/EKNetworkTests/HighCoverageTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func testURLComponentsInvalidQuery() async throws {
114114
}
115115
}
116116

117-
let manager = NetworkManager(baseURL: URL(string: "https://api.test")!)
117+
_ = NetworkManager(baseURL: URL(string: "https://api.test")!)
118118

119119
// This should still work, but tests the URLComponents path
120120
class TestProtocol: URLProtocol {

0 commit comments

Comments
 (0)