Skip to content

Commit c39d002

Browse files
fixup: Replace Any function param with any Sendable
Signed-off-by: Si Beaumont <beaumont@apple.com>
1 parent 5f6099e commit c39d002

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/OpenAPIRuntime/Errors/RuntimeError.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ internal enum RuntimeError: Error, CustomStringConvertible, LocalizedError, Pret
5656
case handlerFailed(any Error)
5757

5858
// Unexpected response (thrown by shorthand APIs)
59-
case unexpectedResponseStatus(expectedStatus: String, response: Any)
60-
case unexpectedResponseBody(expectedContent: String, body: Any)
59+
case unexpectedResponseStatus(expectedStatus: String, response: any Sendable)
60+
case unexpectedResponseBody(expectedContent: String, body: any Sendable)
6161

6262
// MARK: CustomStringConvertible
6363

@@ -109,11 +109,11 @@ internal enum RuntimeError: Error, CustomStringConvertible, LocalizedError, Pret
109109
}
110110

111111
@_spi(Generated)
112-
public func throwUnexpectedResponseStatus(expectedStatus: String, response: Any) throws -> Never {
112+
public func throwUnexpectedResponseStatus(expectedStatus: String, response: any Sendable) throws -> Never {
113113
throw RuntimeError.unexpectedResponseStatus(expectedStatus: expectedStatus, response: response)
114114
}
115115

116116
@_spi(Generated)
117-
public func throwUnexpectedResponseBody(expectedContent: String, body: Any) throws -> Never {
117+
public func throwUnexpectedResponseBody(expectedContent: String, body: any Sendable) throws -> Never {
118118
throw RuntimeError.unexpectedResponseBody(expectedContent: expectedContent, body: body)
119119
}

0 commit comments

Comments
 (0)