From 4a85915ebe7f673cd475666b27dbeb7fdba8502c Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sat, 24 Feb 2024 17:47:19 -0500 Subject: [PATCH] Updates parameter order for onReceive overloads for TaskResult's --- Sources/ComposableSubscriber/ReceiveReducer.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/ComposableSubscriber/ReceiveReducer.swift b/Sources/ComposableSubscriber/ReceiveReducer.swift index f456176..421b7b7 100644 --- a/Sources/ComposableSubscriber/ReceiveReducer.swift +++ b/Sources/ComposableSubscriber/ReceiveReducer.swift @@ -29,8 +29,8 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess setAction: @escaping (inout State, V) -> Void, - onFail: OnFailAction? = nil + onFail: OnFailAction? = nil, + onSuccess setAction: @escaping (inout State, V) -> Void ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in switch result { @@ -46,7 +46,7 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess toStateKeyPath: WritableKeyPath, + set toStateKeyPath: WritableKeyPath, onFail: OnFailAction? = nil ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in @@ -63,7 +63,7 @@ extension Reducer { public func onReceive( action toReceiveAction: CaseKeyPath>, - onSuccess toStateKeyPath: WritableKeyPath, + set toStateKeyPath: WritableKeyPath, onFail: OnFailAction? = nil ) -> _ReceiveReducer> { self.onReceive(action: toReceiveAction) { state, result in