Skip to content

Commit 695aa79

Browse files
committed
Add a fallback for next (for pre 6.2 swift's)
1 parent 04fdd4e commit 695aa79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/AsyncAlgorithms/AsyncShareSequence.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,10 @@ extension AsyncShareSequence: AsyncSequence {
683683
init(_ iteration: Iteration) {
684684
side = Side(iteration)
685685
}
686+
687+
mutating func next() async rethrows -> Element? {
688+
try await side.next(isolation: nil)
689+
}
686690

687691
mutating func next(isolation actor: isolated (any Actor)?) async throws(Failure) -> Element? {
688692
try await side.next(isolation: actor)

0 commit comments

Comments
 (0)