Skip to content

Commit 18c7266

Browse files
authored
add missing @available anotations (#525)
Otherwise it fails to compile with Xcode 13.1. Xcode 13.2 seems fine without but this is probably a regression in the swift compiler because the @available anotations are actally needed.
1 parent 24b0a14 commit 18c7266

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ extension Collection {
549549
}
550550
}
551551

552+
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
552553
struct AsyncSequenceFromSyncSequence<Wrapped: Sequence>: AsyncSequence {
553554
typealias Element = Wrapped.Element
554555
struct AsyncIterator: AsyncIteratorProtocol {
@@ -565,6 +566,7 @@ struct AsyncSequenceFromSyncSequence<Wrapped: Sequence>: AsyncSequence {
565566
}
566567
}
567568

569+
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
568570
extension Sequence {
569571
/// Turns `self` into an `AsyncSequence` by wending each element of `self` asynchronously.
570572
func asAsyncSequence() -> AsyncSequenceFromSyncSequence<Self> {

Tests/AsyncHTTPClientTests/XCTest+AsyncAwait.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ internal func XCTAssertThrowsError<T>(
7676
}
7777
}
7878

79+
@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
7980
internal func XCTAssertNoThrowWithResult<Result>(
8081
_ expression: @autoclosure () async throws -> Result,
8182
file: StaticString = #file,

0 commit comments

Comments
 (0)