From 03604ffcd9b558fd865b4a593caa724522a4f425 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Tue, 7 Jul 2026 10:17:17 -0700 Subject: [PATCH] Use typed error instead of rethrows --- Sources/System/IORing/RawIORequest.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/System/IORing/RawIORequest.swift b/Sources/System/IORing/RawIORequest.swift index c9b80dc..1de6013 100644 --- a/Sources/System/IORing/RawIORequest.swift +++ b/Sources/System/IORing/RawIORequest.swift @@ -176,20 +176,20 @@ extension RawIORequest { } @inlinable - static func withTimeoutRequest( + static func withTimeoutRequest( linkedTo opEntry: UnsafeMutablePointer, in timeoutEntry: UnsafeMutablePointer, - duration: Duration, - flags: TimeOutFlags, - work: () throws -> R) rethrows -> R { + duration: Duration, + flags: TimeOutFlags, + work: () throws(E) -> R) throws(E) -> R { opEntry.pointee.flags |= Flags.linkRequest.rawValue opEntry.pointee.off = 1 var ts = timespec( - tv_sec: Int(duration.components.seconds), + tv_sec: Int(duration.components.seconds), tv_nsec: Int(duration.components.attoseconds / 1_000_000_000) ) - return try withUnsafePointer(to: &ts) { tsPtr in + return try withUnsafePointer(to: &ts) { tsPtr throws(E) -> R in var req: RawIORequest = RawIORequest() req.operation = .link_timeout req.rawValue.timeout_flags = flags.rawValue