Skip to content

Commit 51001e9

Browse files
committed
Remove Sendable constraint for AsyncAdjacentPairsSequence
# Motivation We want to remove any `Sendable` constraints on iterators since they ought to not be passed between `Task`s. # Modification Explicitly mark the `AsyncAdjacentPairsSequence` to be not `Sendable`. # Result Nobody can make this `Sendable`.
1 parent 081ca79 commit 51001e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/AsyncAlgorithms/AsyncAdjacentPairsSequence.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,7 @@ extension AsyncSequence {
8383
}
8484
}
8585

86-
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
87-
extension AsyncAdjacentPairsSequence.Iterator: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
86+
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable { }
87+
88+
@available(*, unavailable)
89+
extension AsyncAdjacentPairsSequence.Iterator: Sendable { }

0 commit comments

Comments
 (0)