File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public struct TimeoutController: Sendable {
6363 }
6464
6565 struct State {
66- var running : Task < Never , any Error > ?
66+ var running : Task < Void , any Error > ?
6767 var pending : ( @Sendable ( ) async throws -> Never ) ?
6868 var isComplete : Bool = false
6969 }
@@ -122,13 +122,13 @@ extension TimeoutController {
122122 }
123123 }
124124
125- func startPendingTask( ) -> Task < Never , any Error > ? {
125+ func startPendingTask( ) -> Task < Void , any Error > ? {
126126 return shared. state. withLock { s in
127127 guard let pending = s. pending else {
128128 s. isComplete = true
129129 return nil
130130 }
131- let task = Task { try await pending ( ) }
131+ let task = Task { _ = try await pending ( ) }
132132 s. pending = nil
133133 s. running = task
134134 return task
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ struct TaskSleepIndefinitelyTests {
5151
5252 @Test
5353 func throwsWhenCancelled( ) async {
54- let task = Task {
54+ let task = Task < Void , any Error > {
5555 try await Task . sleepIndefinitely ( )
5656 }
5757
You can’t perform that action at this time.
0 commit comments