Skip to content

Commit

Permalink
Fix sendable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Mar 31, 2024
1 parent 214b2ff commit d154235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Soto/Extensions/S3/S3+multipart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension S3 {
partSize: Int = 5 * 1024 * 1024,
concurrentDownloads: Int = 4,
logger: Logger = AWSClient.loggingDisabled,
outputStream: @escaping @Sendable (ByteBuffer, Int64) async throws -> Void
outputStream: @escaping (ByteBuffer, Int64) async throws -> Void
) async throws -> Int64 {
// get object size before downloading
let headRequest = S3.HeadObjectRequest(
Expand All @@ -84,11 +84,11 @@ extension S3 {
/// Structure used to store downloaded buffers and then save them as and when
/// needed
struct DownloadedBuffers {
let outputStream: @Sendable (ByteBuffer) async throws -> Void
let outputStream: (ByteBuffer) async throws -> Void
var buffers: [ByteBuffer?]
var bufferSavedIndex: Int

init(numberOfBuffers: Int, outputStream: @escaping @Sendable (ByteBuffer) async throws -> Void) {
init(numberOfBuffers: Int, outputStream: @escaping (ByteBuffer) async throws -> Void) {
self.outputStream = outputStream
self.buffers = Array(repeating: nil, count: numberOfBuffers)
self.bufferSavedIndex = 0
Expand Down Expand Up @@ -340,7 +340,7 @@ extension S3 {
abortOnFail: Bool = true,
threadPool: NIOThreadPool = .singleton,
logger: Logger = AWSClient.loggingDisabled,
progress: @escaping (Double) async throws -> Void = { _ in }
progress: @escaping @Sendable (Double) async throws -> Void = { _ in }
) async throws -> CompleteMultipartUploadOutput {
let fileIO = NonBlockingFileIO(threadPool: threadPool)
return try await fileIO.withFileRegion(path: filename) { fileRegion in
Expand Down

0 comments on commit d154235

Please sign in to comment.