Skip to content

Commit b573e1c

Browse files
stephencelismluisbrown
authored andcommitted
Send should explicitly wrap @MainActor closure (#1311)
(cherry picked from commit 238404dc68cff09558ebdee20d1b5d25ac9191d0)
1 parent 498c222 commit b573e1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ComposableArchitecture/Effect.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ extension Effect where Failure == Never {
305305
/// [callAsFunction]: https://docs.swift.org/swift-book/ReferenceManual/Declarations.html#ID622
306306
@MainActor
307307
public struct Send<Action> {
308-
public let send: (Action) -> Void
308+
public let send: @MainActor (Action) -> Void
309309

310-
public init(send: @escaping (Action) -> Void) {
310+
public init(send: @escaping @MainActor (Action) -> Void) {
311311
self.send = send
312312
}
313313

0 commit comments

Comments
 (0)