Fix a new warning for Swift 6.2

This commit is contained in:
Sami Samhuri 2025-11-05 08:38:35 -08:00
parent bb8d04b54f
commit c2a231a40f
No known key found for this signature in database

View file

@ -71,7 +71,7 @@ public final class AsyncMonitor: Hashable, AsyncCancellable {
public init<Element: Sendable, Sequence>( public init<Element: Sendable, Sequence>(
sequence: sending Sequence, sequence: sending Sequence,
@_inheritActorContext performing block: @escaping @Sendable (Element) async -> Void @_inheritActorContext performing block: @escaping @Sendable (Element) async -> Void
) where Sequence: AsyncSequence, Element == Sequence.Element { ) where Sequence: AsyncSequence & Sendable, Sequence.Element == Element {
self.task = Task { self.task = Task {
do { do {
for try await element in sequence { for try await element in sequence {