Skip to content

Commit 9c47990

Browse files
authored
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 43449a4 commit 9c47990

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
@@ -205,7 +205,7 @@ extension Reducer {
205205
_ action: LocalAction,
206206
file: StaticString = #file,
207207
line: UInt = #line,
208-
_ update: @escaping (inout LocalState) throws -> Void = { _ in }
208+
_ update: ((inout LocalState) throws -> Void)? = nil
209209
) -> Step {
210210
Step(.send(action, update), file: file, line: line)
211211
}
@@ -215,7 +215,7 @@ extension Reducer {
215215
_ action: Action,
216216
file: StaticString = #file,
217217
line: UInt = #line,
218-
_ update: @escaping (inout LocalState) throws -> Void = { _ in }
218+
_ update: ((inout LocalState) throws -> Void)? = nil
219219
) -> Step {
220220
Step(.receive(action, update), file: file, line: line)
221221
}
@@ -257,8 +257,8 @@ extension Reducer {
257257
}
258258

259259
fileprivate indirect enum StepType {
260-
case send(LocalAction, (inout LocalState) throws -> Void)
261-
case receive(Action, (inout LocalState) throws -> Void)
260+
case send(LocalAction, ((inout LocalState) throws -> Void)?)
261+
case receive(Action, ((inout LocalState) throws -> Void)?)
262262
case environment((inout Environment) throws -> Void)
263263
case `do`(() throws -> Void)
264264
case sequence([Step])

0 commit comments

Comments
 (0)