Remove Sendable constraint for AsyncAdjacentPairsSequence (#212)

# 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`.
This commit is contained in:
Franz Busch authored and GitHub committed 2022-10-14 08:39:53 -07:00
1 parent aedcb785a4
commit c21ee2d706
1 file changed
+4 -2
@@ -83,5 +83,7 @@ extension AsyncSequence {
}
}
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
extension AsyncAdjacentPairsSequence.Iterator: Sendable where Base: Sendable, Base.Element: Sendable, Base.AsyncIterator: Sendable { }
extension AsyncAdjacentPairsSequence: Sendable where Base: Sendable, Base.Element: Sendable { }
@available(*, unavailable)
extension AsyncAdjacentPairsSequence.Iterator: Sendable { }