From 10c7f329a68ba3e944409adddb21a106e1089b98 Mon Sep 17 00:00:00 2001 From: Fabrice de Gans Date: Fri, 28 Jun 2024 12:37:41 -0700 Subject: [PATCH] Remove unnecessary try block The code in the try block cannot throw. --- Sources/WinAppDriver/WinAppDriver.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/WinAppDriver/WinAppDriver.swift b/Sources/WinAppDriver/WinAppDriver.swift index e3eb090..f907af5 100644 --- a/Sources/WinAppDriver/WinAppDriver.swift +++ b/Sources/WinAppDriver/WinAppDriver.swift @@ -51,8 +51,8 @@ public class WinAppDriver: WebDriver { var securityAttributes = SECURITY_ATTRIBUTES() securityAttributes.nLength = DWORD(MemoryLayout.size) securityAttributes.bInheritHandle = true - launchOptions.stdoutHandle = try outputFile.withCString(encodedAs: UTF16.self) { - outputFile throws in + launchOptions.stdoutHandle = outputFile.withCString(encodedAs: UTF16.self) { + outputFile in CreateFileW( UnsafeMutablePointer(mutating: outputFile), DWORD(GENERIC_WRITE), DWORD(FILE_SHARE_READ), &securityAttributes,