@@ -114,7 +114,7 @@ extension WorkflowNode {
114
114
115
115
extension WorkflowNode . SubtreeManager {
116
116
enum Output {
117
- case update( AnyWorkflowAction < WorkflowType > , source: WorkflowUpdateDebugInfo . Source )
117
+ case update( any WorkflowAction < WorkflowType > , source: WorkflowUpdateDebugInfo . Source )
118
118
case childDidUpdate( WorkflowUpdateDebugInfo )
119
119
}
120
120
}
@@ -175,7 +175,7 @@ extension WorkflowNode.SubtreeManager {
175
175
/// Update the existing child
176
176
existing. update (
177
177
workflow: workflow,
178
- outputMap: { AnyWorkflowAction ( outputMap ( $0) ) } ,
178
+ outputMap: { outputMap ( $0) } ,
179
179
eventPipe: eventPipe
180
180
)
181
181
child = existing
@@ -184,7 +184,7 @@ extension WorkflowNode.SubtreeManager {
184
184
/// This spins up a new workflow node, etc to host the newly created child.
185
185
child = ChildWorkflow < Child > (
186
186
workflow: workflow,
187
- outputMap: { AnyWorkflowAction ( outputMap ( $0) ) } ,
187
+ outputMap: { outputMap ( $0) } ,
188
188
eventPipe: eventPipe
189
189
)
190
190
}
@@ -272,7 +272,7 @@ extension WorkflowNode.SubtreeManager {
272
272
273
273
fileprivate final class ReusableSink < Action: WorkflowAction > : AnyReusableSink where Action. WorkflowType == WorkflowType {
274
274
func handle( action: Action ) {
275
- let output = Output . update ( AnyWorkflowAction ( action) , source: . external)
275
+ let output = Output . update ( action, source: . external)
276
276
277
277
if case . pending = eventPipe. validationState {
278
278
// Workflow is currently processing an `event`.
@@ -387,9 +387,13 @@ extension WorkflowNode.SubtreeManager {
387
387
388
388
fileprivate final class ChildWorkflow < W: Workflow > : AnyChildWorkflow {
389
389
private let node : WorkflowNode < W >
390
- private var outputMap : ( W . Output ) -> AnyWorkflowAction < WorkflowType >
390
+ private var outputMap : ( W . Output ) -> any WorkflowAction < WorkflowType >
391
391
392
- init ( workflow: W , outputMap: @escaping ( W . Output ) -> AnyWorkflowAction < WorkflowType > , eventPipe: EventPipe ) {
392
+ init (
393
+ workflow: W ,
394
+ outputMap: @escaping ( W . Output ) -> any WorkflowAction < WorkflowType > ,
395
+ eventPipe: EventPipe
396
+ ) {
393
397
self . outputMap = outputMap
394
398
self . node = WorkflowNode < W > ( workflow: workflow)
395
399
@@ -408,7 +412,11 @@ extension WorkflowNode.SubtreeManager {
408
412
return node. render ( isRootNode: false )
409
413
}
410
414
411
- func update( workflow: W , outputMap: @escaping ( W . Output ) -> AnyWorkflowAction < WorkflowType > , eventPipe: EventPipe ) {
415
+ func update(
416
+ workflow: W ,
417
+ outputMap: @escaping ( W . Output ) -> any WorkflowAction < WorkflowType > ,
418
+ eventPipe: EventPipe
419
+ ) {
412
420
self . outputMap = outputMap
413
421
self . eventPipe = eventPipe
414
422
node. update ( workflow: workflow)
0 commit comments