Skip to content

Commit 5aa3a63

Browse files
authored
Mark deprecated FunctionURLResponse init as @_disfavoredOverload (#93)
In a previous PR (#91), a new init with a different parameters order was added, marking the previous one was deprecated. The problem is that the compiler doesn't know which one to choose when omitting the final parameters. This PR fixes it by marking the deprecated init with `@_disfavoredOverload`.
1 parent 89f1172 commit 5aa3a63

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/AWSLambdaEvents/FunctionURL.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public struct FunctionURLResponse: Codable, Sendable {
9595
public var isBase64Encoded: Bool?
9696

9797
@available(*, deprecated, message: "Use init(statusCode:headers:body:isBase64Encoded:cookies:) instead")
98+
@_disfavoredOverload
9899
public init(
99100
statusCode: HTTPResponse.Status,
100101
headers: HTTPHeaders? = nil,

0 commit comments

Comments
 (0)