From 0896f3d3656aece8328a05f4f318bfc42d5ec3b6 Mon Sep 17 00:00:00 2001 From: Tristan Labelle Date: Sat, 26 Aug 2023 08:26:54 -0400 Subject: [PATCH] Fix build errors --- Sources/HTTPWebDriver.swift | 6 +++--- Sources/WebDriverRequest.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/HTTPWebDriver.swift b/Sources/HTTPWebDriver.swift index f0091e2..68fd22b 100644 --- a/Sources/HTTPWebDriver.swift +++ b/Sources/HTTPWebDriver.swift @@ -13,8 +13,8 @@ public struct HTTPWebDriver: WebDriver { // Send a WebDriverRequest to the web driver local service // TODO: consider making this function async/awaitable @discardableResult - public func send(_ request: Request) throws -> Request.Response where Request: WebDriverRequest { - let urlRequest = Self.buildURLRequest(request) + public func send(_ request: Request) throws -> Request.Response { + let urlRequest = try buildURLRequest(request) // Send the request and decode result or error let (status, responseData) = try urlRequest.send() @@ -24,7 +24,7 @@ public struct HTTPWebDriver: WebDriver { return try JSONDecoder().decode(Request.Response.self, from: responseData) } - private static func buildURLRequest(_ request: Request) throws -> URLRequest { + private func buildURLRequest(_ request: Request) throws -> URLRequest { var url = rootURL for pathComponent in request.pathComponents { url.appendPathComponent(pathComponent) diff --git a/Sources/WebDriverRequest.swift b/Sources/WebDriverRequest.swift index 9ea0199..ca051b6 100644 --- a/Sources/WebDriverRequest.swift +++ b/Sources/WebDriverRequest.swift @@ -13,7 +13,7 @@ public protocol WebDriverRequest { var body: Body { get } } -extension WebDriverRequest where ResponseValue = CodableNone { +extension WebDriverRequest where Body == CodableNone { var body: Body { .init() } }