From 695aa79f7a404b2b4d4b1c3612695926738b1b0f Mon Sep 17 00:00:00 2001 From: Philippe Hausler Date: Tue, 9 Sep 2025 09:39:50 -0700 Subject: [PATCH] Add a fallback for next (for pre 6.2 swift's) --- Sources/AsyncAlgorithms/AsyncShareSequence.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/AsyncAlgorithms/AsyncShareSequence.swift b/Sources/AsyncAlgorithms/AsyncShareSequence.swift index 6bdee70..3253368 100644 --- a/Sources/AsyncAlgorithms/AsyncShareSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncShareSequence.swift @@ -683,6 +683,10 @@ extension AsyncShareSequence: AsyncSequence { init(_ iteration: Iteration) { side = Side(iteration) } + + mutating func next() async rethrows -> Element? { + try await side.next(isolation: nil) + } mutating func next(isolation actor: isolated (any Actor)?) async throws(Failure) -> Element? { try await side.next(isolation: actor)