@@ -29,10 +29,10 @@ public distributed actor DistributedProgress<Steps: DistributedProgressSteps> {
2929
3030 func to( step: Steps ) async throws {
3131 // TODO: checks that we don't move backwards...
32- log. notice ( " Move to step: \( step) " )
32+ self . log. notice ( " Move to step: \( step) " )
3333 self . step = step
3434
35- for sub in subscribers {
35+ for sub in self . subscribers {
3636 try await sub. currentStep ( step)
3737 }
3838
@@ -108,7 +108,7 @@ public distributed actor DistributedProgress<Steps: DistributedProgressSteps> {
108108 return
109109 }
110110
111- try await ensureSubscription ( )
111+ try await self . ensureSubscription ( )
112112
113113 await withCheckedContinuation { ( cc: CheckedContinuation < Void , Never > ) in
114114 self . _completedCC = cc
@@ -121,7 +121,7 @@ public distributed actor DistributedProgress<Steps: DistributedProgressSteps> {
121121 return nil // last step was already emitted
122122 }
123123
124- try await ensureSubscription ( )
124+ try await self . ensureSubscription ( )
125125
126126 return await withCheckedContinuation { ( cc: CheckedContinuation < Steps , Never > ) in
127127 self . _nextCC = cc
@@ -168,7 +168,6 @@ public distributed actor DistributedProgress<Steps: DistributedProgressSteps> {
168168// MARK: Progress AsyncSequence
169169
170170extension DistributedProgress . Box {
171-
172171 public func steps( file: String = #file, line: UInt = #line) async throws -> DistributedProgressAsyncSequence < Steps > {
173172 try await self . ensureSubscription ( )
174173
@@ -198,7 +197,7 @@ public struct DistributedProgressAsyncSequence<Steps: DistributedProgressSteps>:
198197 }
199198
200199 public func next( ) async throws -> Steps ? {
201- try await box. nextStep ( )
200+ try await self . box. nextStep ( )
202201 }
203202 }
204203}
@@ -210,6 +209,7 @@ public protocol DistributedProgressSteps: Codable, Sendable, Equatable, CaseIter
210209 static var count : Int { get }
211210 static var last : Self { get }
212211}
212+
213213extension DistributedProgressSteps {
214214 public static var count : Int {
215215 precondition ( count > 0 , " \( Self . self) cannot have zero steps (cases)! " )
@@ -222,4 +222,4 @@ extension DistributedProgressSteps {
222222 }
223223 return last
224224 }
225- }
225+ }
0 commit comments