diff --git a/Sources/AWSLambdaRuntime/Lambda+Codable.swift b/Sources/AWSLambdaRuntime/Lambda+Codable.swift index 6173b0d2..c4e47c13 100644 --- a/Sources/AWSLambdaRuntime/Lambda+Codable.swift +++ b/Sources/AWSLambdaRuntime/Lambda+Codable.swift @@ -29,7 +29,7 @@ extension Lambda { /// - closure: `CodableClosure` based Lambda. /// /// - note: This is a blocking operation that will run forever, as its lifecycle is managed by the AWS Lambda Runtime Engine. - public static func run(_ closure: @escaping CodableClosure) { + public static func run(_ closure: @escaping CodableClosure) -> Never { self.run(CodableClosureWrapper(closure)) } @@ -42,7 +42,7 @@ extension Lambda { /// - closure: `CodableVoidClosure` based Lambda. /// /// - note: This is a blocking operation that will run forever, as its lifecycle is managed by the AWS Lambda Runtime Engine. - public static func run(_ closure: @escaping CodableVoidClosure) { + public static func run(_ closure: @escaping CodableVoidClosure) -> Never { self.run(CodableVoidClosureWrapper(closure)) } }