Rename downStream to downstream (#263)

This commit is contained in:
Kazumasa Shimomura authored and GitHub committed 2023-06-22 12:54:24 -07:00
1 parent b3394663fd
commit ac9309b2ac
4 files changed
+12 -12

No files matched your search

@@ -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)
}
}
@@ -517,8 +517,8 @@ struct DebounceStateMachine<Base: AsyncSequence, C: Clock> {
/// Actions returned by `clockSleepFinished()`.
enum ClockSleepFinishedAction {
/// Indicates that the downstream continuation should be resumed with the given element.
case resumeDownStreamContinuation(
downStreamContinuation: UnsafeContinuation<Result<Element?, Error>, Never>,
case resumeDownstreamContinuation(
downstreamContinuation: UnsafeContinuation<Result<Element?, Error>, Never>,
element: Element
)
}
@@ -547,8 +547,8 @@ struct DebounceStateMachine<Base: AsyncSequence, C: Clock> {
bufferedElement: nil
)
return .resumeDownStreamContinuation(
downStreamContinuation: downstreamContinuation,
return .resumeDownstreamContinuation(
downstreamContinuation: downstreamContinuation,
element: currentElement.element
)
} else {
@@ -238,8 +238,8 @@ final class DebounceStorage<Base: AsyncSequence, C: Clock>: @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
+3 -3
View File
@@ -49,7 +49,7 @@ final class ZipStorage<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncS
base1: base1,
base2: base2,
base3: base3,
downStreamContinuation: continuation
downstreamContinuation: continuation
)
case .resumeUpstreamContinuations(let upstreamContinuations):
@@ -96,7 +96,7 @@ final class ZipStorage<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncS
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.
@@ -315,6 +315,6 @@ final class ZipStorage<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncS
}
}
stateMachine.taskIsStarted(task: task, downstreamContinuation: downStreamContinuation)
stateMachine.taskIsStarted(task: task, downstreamContinuation: downstreamContinuation)
}
}