diff --git a/Sources/AsyncAlgorithms/AsyncBufferSequence.swift b/Sources/AsyncAlgorithms/AsyncBufferSequence.swift index d6fb27e..3147824 100644 --- a/Sources/AsyncAlgorithms/AsyncBufferSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncBufferSequence.swift @@ -78,7 +78,7 @@ actor AsyncBufferState { func terminate() { terminationState = .terminal - var oldPending = pending + let oldPending = pending pending = [] for continuation in oldPending { continuation.resume(returning: .success(nil)) diff --git a/Tests/AsyncAlgorithmsTests/TestBuffer.swift b/Tests/AsyncAlgorithmsTests/TestBuffer.swift index 57d9d26..d683820 100644 --- a/Tests/AsyncAlgorithmsTests/TestBuffer.swift +++ b/Tests/AsyncAlgorithmsTests/TestBuffer.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -import XCTest +@preconcurrency import XCTest import AsyncAlgorithms final class TestBuffer: XCTestCase { diff --git a/Tests/AsyncAlgorithmsTests/TestRemoveDuplicates.swift b/Tests/AsyncAlgorithmsTests/TestRemoveDuplicates.swift index 39029e5..eb859d0 100644 --- a/Tests/AsyncAlgorithmsTests/TestRemoveDuplicates.swift +++ b/Tests/AsyncAlgorithmsTests/TestRemoveDuplicates.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -import XCTest +@preconcurrency import XCTest import AsyncAlgorithms final class TestRemoveDuplicates: XCTestCase { @@ -64,7 +64,7 @@ final class TestRemoveDuplicates: XCTestCase { throw NSError(domain: NSCocoaErrorDomain, code: -1, userInfo: nil) } return $0 - } as (Int) throws -> Int) + } as @Sendable (Int) throws -> Int) do { for try await item in throwingSequence.removeDuplicates() { diff --git a/Tests/AsyncAlgorithmsTests/TestZip.swift b/Tests/AsyncAlgorithmsTests/TestZip.swift index e0a7955..b6343c1 100644 --- a/Tests/AsyncAlgorithmsTests/TestZip.swift +++ b/Tests/AsyncAlgorithmsTests/TestZip.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -import XCTest +@preconcurrency import XCTest import AsyncAlgorithms final class TestZip2: XCTestCase {