Skip to content

Commit 420e21a

Browse files
committed
Fix the other implementation, too.
1 parent 2850b65 commit 420e21a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

stdlib/public/Concurrency/MainActor.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ extension MainActor {
5454
resultType: T.Type = T.self,
5555
body: @MainActor @Sendable () throws -> T
5656
) 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)
57+
return try await body()
6258
}
6359

6460
/// Execute the given body closure on the main actor.

0 commit comments

Comments
 (0)