Skip to content

Commit

Permalink
FileDownloadDelegate: mark Progress as Sendable (#643)
Browse files Browse the repository at this point in the history
This is a trivial struct that should be `Sendable`, as it's a common use case to pass `Progress` values to `@Sendable` closures.
  • Loading branch information
MaxDesiatov authored Oct 26, 2022
1 parent 0bdc425 commit 10f42e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/AsyncHTTPClient/FileDownloadDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import NIOPosix
public final class FileDownloadDelegate: HTTPClientResponseDelegate {
/// The response type for this delegate: the total count of bytes as reported by the response
/// "Content-Length" header (if available) and the count of bytes downloaded.
public struct Progress {
public struct Progress: Sendable {
public var totalBytes: Int?
public var receivedBytes: Int
}
Expand Down

0 comments on commit 10f42e6

Please sign in to comment.