From 20810bddaa7e7f04bc50b66b522ffef81fca83f4 Mon Sep 17 00:00:00 2001 From: Frizlab Date: Wed, 1 Apr 2026 11:59:53 +0200 Subject: [PATCH] Workaround a forced unwrap --- Sources/TaskGate/AsyncGate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/TaskGate/AsyncGate.swift b/Sources/TaskGate/AsyncGate.swift index 4db9a38..e2548f4 100644 --- a/Sources/TaskGate/AsyncGate.swift +++ b/Sources/TaskGate/AsyncGate.swift @@ -97,7 +97,7 @@ public final class AsyncGate { try await withEscalationMonitoring { () throws(Failure) -> Result in await closeGate() - do { + do throws(Failure) { let value = try await body() openGate() @@ -107,7 +107,7 @@ public final class AsyncGate { openGate() // unsure why the compiler believes this could be `any Error` - throw error as! Failure + throw error } } }