Skip to content

Commit 67910a7

Browse files
committed
Get to 100% coverage
1 parent 0070e39 commit 67910a7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Sources/AsyncQueue/ActorQueue.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ public final class ActorQueue: Sendable {
3535
let taskStream = AsyncStream<@Sendable () async -> Void> { continuation in
3636
capturedTaskStreamContinuation = continuation
3737
}
38-
guard let capturedTaskStreamContinuation else {
39-
fatalError("Continuation not captured during stream creation!")
40-
}
41-
taskStreamContinuation = capturedTaskStreamContinuation
38+
// Continuation will be captured during stream creation, so it is safe to force unwrap here.
39+
// If this force-unwrap fails, something is fundamentally broken in the Swift runtime.
40+
taskStreamContinuation = capturedTaskStreamContinuation!
4241

4342
streamTask = Task.detached(priority: priority) {
4443
actor ActorExecutor {

0 commit comments

Comments
 (0)