diff --git a/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStorage.swift b/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStorage.swift index bc32cee8..d3b67404 100644 --- a/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStorage.swift +++ b/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStorage.swift @@ -58,7 +58,7 @@ final class CombineLatestStorage< base1: base1, base2: base2, base3: base3, - downStreamContinuation: continuation + downstreamContinuation: continuation ) case .resumeContinuation(let downstreamContinuation, let result): @@ -108,7 +108,7 @@ final class CombineLatestStorage< base1: Base1, base2: Base2, base3: Base3?, - downStreamContinuation: StateMachine.DownstreamContinuation + downstreamContinuation: StateMachine.DownstreamContinuation ) { // This creates a new `Task` that is iterating the upstream // sequences. We must store it to cancel it at the right times. @@ -350,6 +350,6 @@ final class CombineLatestStorage< } } - stateMachine.taskIsStarted(task: task, downstreamContinuation: downStreamContinuation) + stateMachine.taskIsStarted(task: task, downstreamContinuation: downstreamContinuation) } } diff --git a/Sources/AsyncAlgorithms/Debounce/DebounceStateMachine.swift b/Sources/AsyncAlgorithms/Debounce/DebounceStateMachine.swift index 98c23287..b75d2f3e 100644 --- a/Sources/AsyncAlgorithms/Debounce/DebounceStateMachine.swift +++ b/Sources/AsyncAlgorithms/Debounce/DebounceStateMachine.swift @@ -517,8 +517,8 @@ struct DebounceStateMachine { /// Actions returned by `clockSleepFinished()`. enum ClockSleepFinishedAction { /// Indicates that the downstream continuation should be resumed with the given element. - case resumeDownStreamContinuation( - downStreamContinuation: UnsafeContinuation, Never>, + case resumeDownstreamContinuation( + downstreamContinuation: UnsafeContinuation, Never>, element: Element ) } @@ -547,8 +547,8 @@ struct DebounceStateMachine { bufferedElement: nil ) - return .resumeDownStreamContinuation( - downStreamContinuation: downstreamContinuation, + return .resumeDownstreamContinuation( + downstreamContinuation: downstreamContinuation, element: currentElement.element ) } else { diff --git a/Sources/AsyncAlgorithms/Debounce/DebounceStorage.swift b/Sources/AsyncAlgorithms/Debounce/DebounceStorage.swift index cd1bb515..40c30634 100644 --- a/Sources/AsyncAlgorithms/Debounce/DebounceStorage.swift +++ b/Sources/AsyncAlgorithms/Debounce/DebounceStorage.swift @@ -238,8 +238,8 @@ final class DebounceStorage: @unchecked Sendable let action = self.stateMachine.withCriticalRegion { $0.clockSleepFinished() } switch action { - case .resumeDownStreamContinuation(let downStreamContinuation, let element): - downStreamContinuation.resume(returning: .success(element)) + case .resumeDownstreamContinuation(let downstreamContinuation, let element): + downstreamContinuation.resume(returning: .success(element)) case .none: break diff --git a/Sources/AsyncAlgorithms/Zip/ZipStorage.swift b/Sources/AsyncAlgorithms/Zip/ZipStorage.swift index f997e681..7d971a78 100644 --- a/Sources/AsyncAlgorithms/Zip/ZipStorage.swift +++ b/Sources/AsyncAlgorithms/Zip/ZipStorage.swift @@ -49,7 +49,7 @@ final class ZipStorage