From de5616a780ec04dfb8323f130ae98659b53fc311 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sat, 24 Feb 2024 15:31:06 -0500 Subject: [PATCH] Updates parameter order to be more readable from the call site. --- Sources/ComposableSubscriber/SubscriberReducer.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/ComposableSubscriber/SubscriberReducer.swift b/Sources/ComposableSubscriber/SubscriberReducer.swift index c451d5b..2f08693 100644 --- a/Sources/ComposableSubscriber/SubscriberReducer.swift +++ b/Sources/ComposableSubscriber/SubscriberReducer.swift @@ -134,14 +134,14 @@ extension Reducer { /// ``` /// /// - Parameters: - /// - toStreamArgument: The argument used to invoke the stream with. /// - stream: The async stream to subscribe to on the reducer + /// - toStreamArgument: The argument used to invoke the stream with. /// - triggerAction: The action to invoke the stream when received. /// - responseAction: The action to invoke with the streamed elements. /// - animation: Optional animation used when elements are received. public func subscribe( - using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, to stream: @escaping @Sendable (StreamArgument) async -> AsyncStream, + using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, on triggerAction: CaseKeyPath, with responseAction: CaseKeyPath, animation: Animation? = nil @@ -294,14 +294,14 @@ extension Reducer { /// ``` /// /// - Parameters: - /// - toStreamArgument: The argument used to invoke the stream with. /// - stream: The async stream to subscribe to on the reducer + /// - toStreamArgument: The argument used to invoke the stream with. /// - triggerAction: The action to invoke the stream when received. /// - responseAction: The action to invoke with the streamed elements. /// - animation: Optional animation used when elements are received. public func subscribe( - using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, to stream: @escaping @Sendable (StreamArgument) async -> AsyncStream, + using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, on triggerAction: CaseKeyPath, with responseAction: CaseKeyPath, animation: Animation? = nil, @@ -455,14 +455,14 @@ extension Reducer { /// ``` /// /// - Parameters: - /// - toStreamArgument: The argument used to invoke the stream with. /// - stream: The async stream to subscribe to on the reducer + /// - toStreamArgument: The argument used to invoke the stream with. /// - triggerAction: The action to invoke the stream when received. /// - responseAction: The action to invoke with the streamed elements. /// - animation: Optional animation used when elements are received. public func subscribe( - using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, to stream: @escaping @Sendable (StreamArgument) async -> AsyncStream, + using toStreamArgument: @escaping @Sendable (State) -> StreamArgument, on triggerAction: CaseKeyPath, operation: @escaping @Sendable (_ send: Send, StreamElement) async throws -> Void ) -> _SubscribeReducer {