diff --git a/CHANGELOG.md b/CHANGELOG.md index 986d1ee..7a5eede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Get 2.x +## Get 2.2.1 + +*Oct 15, 2024* + +- Fix Swift 6 warnings + ## Get 2.2 *Apr 13, 2024* diff --git a/Sources/Get/DataLoader.swift b/Sources/Get/DataLoader.swift index 6e1cc18..b0e7ba8 100644 --- a/Sources/Get/DataLoader.swift +++ b/Sources/Get/DataLoader.swift @@ -32,7 +32,7 @@ final class DataLoader: NSObject, URLSessionDataDelegate, URLSessionDownloadDele try await withTaskCancellationHandler(operation: { try await withUnsafeThrowingContinuation { continuation in let handler = DataTaskHandler(delegate: delegate) - handler.completion = continuation.resume(with:) + handler.completion = { continuation.resume(with: $0) } self.handlers[task] = handler task.resume() @@ -46,7 +46,7 @@ final class DataLoader: NSObject, URLSessionDataDelegate, URLSessionDownloadDele try await withTaskCancellationHandler(operation: { try await withUnsafeThrowingContinuation { continuation in let handler = DownloadTaskHandler(delegate: delegate) - handler.completion = continuation.resume(with:) + handler.completion = { continuation.resume(with: $0) } self.handlers[task] = handler task.resume() @@ -60,7 +60,7 @@ final class DataLoader: NSObject, URLSessionDataDelegate, URLSessionDownloadDele try await withTaskCancellationHandler(operation: { try await withUnsafeThrowingContinuation { continuation in let handler = DataTaskHandler(delegate: delegate) - handler.completion = continuation.resume(with:) + handler.completion = { continuation.resume(with: $0) } self.handlers[task] = handler task.resume()