Skip to content

Commit 245674c

Browse files
author
Joel Saltzman
authored
Renamed completeWithAsync to completeWithTask (#221)
* Renamed EventLoopPromise's `completeWithAsync` to `completeWithTask` (based on the SwiftNIO renaming) * Updated swift-nio dependency to 2.32.0
1 parent 48dc507 commit 245674c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let package = Package(
1515
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
1616
],
1717
dependencies: [
18-
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.30.0")),
18+
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.32.0")),
1919
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.4.2")),
2020
.package(url: "https://github.com/swift-server/swift-backtrace.git", .upToNextMajor(from: "1.2.3")),
2121
],

Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public protocol AsyncLambdaHandler: EventLoopLambdaHandler {
115115
extension AsyncLambdaHandler {
116116
public func handle(context: Lambda.Context, event: In) -> EventLoopFuture<Out> {
117117
let promise = context.eventLoop.makePromise(of: Out.self)
118-
promise.completeWithAsync {
118+
promise.completeWithTask {
119119
try await self.handle(event: event, context: context)
120120
}
121121
return promise.futureResult
@@ -127,7 +127,7 @@ extension AsyncLambdaHandler {
127127
public static func main() {
128128
Lambda.run { context -> EventLoopFuture<ByteBufferLambdaHandler> in
129129
let promise = context.eventLoop.makePromise(of: ByteBufferLambdaHandler.self)
130-
promise.completeWithAsync {
130+
promise.completeWithTask {
131131
try await Self(context: context)
132132
}
133133
return promise.futureResult

0 commit comments

Comments
 (0)