Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Mar 6, 2023
1 parent 11d9a7b commit f2c6e5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions Sources/ComposableArchitecture/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ public typealias StoreOf<R: Reducer> = Store<R.State, R.Action>
var isSending = false
let rescopedStore = Store<RescopedState, RescopedAction>(
initialState: toRescopedState(scopedStore.state.value),
reducer: .init { rescopedState, rescopedAction, _ in
reducer: Reduce({ rescopedState, rescopedAction in
isSending = true
defer { isSending = false }
guard
Expand All @@ -761,8 +761,7 @@ public typealias StoreOf<R: Reducer> = Store<R.State, R.Action>
} else {
return .none
}
},
environment: ()
})
)
rescopedStore.parentCancellable = scopedStore.state
.dropFirst()
Expand Down
4 changes: 2 additions & 2 deletions Sources/ComposableArchitecture/TestStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1383,13 +1383,13 @@ extension TestStore where ScopedState: Equatable, Action: Equatable {
guard !self.reducer.inFlightEffects.isEmpty
else {
_ = {
self.receive(expectedAction, assert: updateStateToExpectedResult, file: file, line: line)
self._receive(expectedAction, assert: updateStateToExpectedResult, file: file, line: line)
}()
return
}
await self.receiveAction(timeout: nanoseconds, file: file, line: line)
_ = {
self.receive(expectedAction, assert: updateStateToExpectedResult, file: file, line: line)
self._receive(expectedAction, assert: updateStateToExpectedResult, file: file, line: line)
}()
await Task.megaYield()
}
Expand Down

0 comments on commit f2c6e5f

Please sign in to comment.