We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2850b65 commit 420e21aCopy full SHA for 420e21a
stdlib/public/Concurrency/MainActor.swift
@@ -54,11 +54,7 @@ extension MainActor {
54
resultType: T.Type = T.self,
55
body: @MainActor @Sendable () throws -> T
56
) async rethrows -> T {
57
- @MainActor func runOnMain(body: @MainActor @Sendable () throws -> T) rethrows -> T {
58
- return try body()
59
- }
60
-
61
- return try await runOnMain(body: body)
+ return try await body()
62
}
63
64
/// Execute the given body closure on the main actor.
0 commit comments