Skip to content

Commit

Permalink
Remove unnecessary try block
Browse files Browse the repository at this point in the history
The code in the try block cannot throw.
  • Loading branch information
Steelskin committed Jun 28, 2024
1 parent 79541bb commit 10c7f32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/WinAppDriver/WinAppDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public class WinAppDriver: WebDriver {
var securityAttributes = SECURITY_ATTRIBUTES()
securityAttributes.nLength = DWORD(MemoryLayout<SECURITY_ATTRIBUTES>.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<WCHAR>(mutating: outputFile), DWORD(GENERIC_WRITE),
DWORD(FILE_SHARE_READ), &securityAttributes,
Expand Down

0 comments on commit 10c7f32

Please sign in to comment.