Skip to content

Commit

Permalink
Explicitly marked Delegate as Sendable because with the 5.10 comp…
Browse files Browse the repository at this point in the history
…iler it complains otherwise.

`Sendable` is inherited via the URL session delegate protocols, and the Swift 6.0 (beta) compiler understands that just fine.  I'm not sure why 5.10 doesn't. 😕

The explicit `Sendable` is harmless, just pointless in principle.
  • Loading branch information
wadetregaskis committed Jun 23, 2024
1 parent 49a859a commit 03125f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/NetworkScannerDemo/NetworkScannerDemo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func probeFake(address: String) async throws -> NetworkScanner<Void, Void>.Resul
return Bool.random() ? .hit : .miss
}

final class Delegate: NSObject, URLSessionDelegate, URLSessionDataDelegate {
final class Delegate: NSObject, URLSessionDelegate, URLSessionDataDelegate, Sendable {
func urlSession(_ session: URLSession,
task: URLSessionTask,
willPerformHTTPRedirection response: HTTPURLResponse,
Expand Down

0 comments on commit 03125f5

Please sign in to comment.