Conditional conformance for Sendable for throttle types (#52)

This commit is contained in:
Philippe Hausler authored and GitHub committed 2022-02-18 16:44:26 -08:00
1 parent 5bfab6f07a
commit a6ad9b82e9
1 file changed
+3 -2
@@ -51,8 +51,6 @@ public struct AsyncThrottleSequence<Base: AsyncSequence, C: Clock, Reduced> {
}
}
extension AsyncThrottleSequence: Sendable where Base: Sendable, Element: Sendable { }
extension AsyncThrottleSequence: AsyncSequence {
public typealias Element = Reduced
@@ -90,3 +88,6 @@ extension AsyncThrottleSequence: AsyncSequence {
Iterator(base.makeAsyncIterator(), interval: interval, clock: clock, reducing: reducing)
}
}
extension AsyncThrottleSequence: Sendable where Base: Sendable, Element: Sendable { }
extension AsyncThrottleSequence.Iterator: Sendable where Base.AsyncIterator: Sendable { }