Skip to content

Commit 57b362c

Browse files
authored
Merge pull request #37705 from iHackSubhodip/main
2 parents 94825b1 + 80e2d9a commit 57b362c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stdlib/public/Concurrency/SourceCompatibilityShims.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension TaskPriority {
4949
@available(SwiftStdlib 5.5, *)
5050
@_alwaysEmitIntoClient
5151
public func withTaskCancellationHandler<T>(
52-
handler: @Sendable () -> (),
52+
handler: @Sendable () -> Void,
5353
operation: () async throws -> T
5454
) async rethrows -> T {
5555
try await withTaskCancellationHandler(operation: operation, onCancel: handler)
@@ -60,7 +60,7 @@ extension Task where Success == Never, Failure == Never {
6060
@available(*, deprecated, message: "`Task.withCancellationHandler` has been replaced by `withTaskCancellationHandler` and will be removed shortly.")
6161
@_alwaysEmitIntoClient
6262
public static func withCancellationHandler<T>(
63-
handler: @Sendable () -> (),
63+
handler: @Sendable () -> Void,
6464
operation: () async throws -> T
6565
) async rethrows -> T {
6666
try await withTaskCancellationHandler(handler: handler, operation: operation)

stdlib/public/Concurrency/TaskCancellation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public struct CancellationError: Error {
112112

113113
@available(SwiftStdlib 5.5, *)
114114
@_silgen_name("swift_task_addCancellationHandler")
115-
func _taskAddCancellationHandler(handler: @Sendable () -> ()) -> UnsafeRawPointer /*CancellationNotificationStatusRecord*/
115+
func _taskAddCancellationHandler(handler: @Sendable () -> Void) -> UnsafeRawPointer /*CancellationNotificationStatusRecord*/
116116

117117
@available(SwiftStdlib 5.5, *)
118118
@_silgen_name("swift_task_removeCancellationHandler")

0 commit comments

Comments
 (0)