Skip to content

Commit 7713fbe

Browse files
stephencelismluisbrown
authored andcommitted
Fix deprecated "TestStore.assert" APIs (#1153)
The new exhaustive check around state changes was not backported, so some tests could start to fail when upgrading TCA.
1 parent d8ef148 commit 7713fbe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/ComposableArchitecture/Internal/Deprecations.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ extension Reducer {
209209
_ action: LocalAction,
210210
file: StaticString = #file,
211211
line: UInt = #line,
212-
_ update: @escaping (inout LocalState) throws -> Void = { _ in }
212+
_ update: ((inout LocalState) throws -> Void)? = nil
213213
) -> Step {
214214
Step(.send(action, update), file: file, line: line)
215215
}
@@ -219,7 +219,7 @@ extension Reducer {
219219
_ action: Action,
220220
file: StaticString = #file,
221221
line: UInt = #line,
222-
_ update: @escaping (inout LocalState) throws -> Void = { _ in }
222+
_ update: ((inout LocalState) throws -> Void)? = nil
223223
) -> Step {
224224
Step(.receive(action, update), file: file, line: line)
225225
}
@@ -261,8 +261,8 @@ extension Reducer {
261261
}
262262

263263
fileprivate indirect enum StepType {
264-
case send(LocalAction, (inout LocalState) throws -> Void)
265-
case receive(Action, (inout LocalState) throws -> Void)
264+
case send(LocalAction, ((inout LocalState) throws -> Void)?)
265+
case receive(Action, ((inout LocalState) throws -> Void)?)
266266
case environment((inout Environment) throws -> Void)
267267
case `do`(() throws -> Void)
268268
case sequence([Step])

0 commit comments

Comments
 (0)