Skip to content

Commit f9d10b2

Browse files
Joel Saltzmanfabianfett
Joel Saltzman
authored andcommitted
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 a9e15b1 commit f9d10b2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: Package.swift

+1-1
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
],

Diff for: Sources/AWSLambdaRuntimeCore/LambdaHandler.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public protocol AsyncLambdaHandler: EventLoopLambdaHandler {
114114
extension AsyncLambdaHandler {
115115
public func handle(context: Lambda.Context, event: In) -> EventLoopFuture<Out> {
116116
let promise = context.eventLoop.makePromise(of: Out.self)
117-
promise.completeWithAsync {
117+
promise.completeWithTask {
118118
try await self.handle(event: event, context: context)
119119
}
120120
return promise.futureResult
@@ -126,7 +126,7 @@ extension AsyncLambdaHandler {
126126
public static func main() {
127127
Lambda.run { context -> EventLoopFuture<ByteBufferLambdaHandler> in
128128
let promise = context.eventLoop.makePromise(of: ByteBufferLambdaHandler.self)
129-
promise.completeWithAsync {
129+
promise.completeWithTask {
130130
try await Self(context: context)
131131
}
132132
return promise.futureResult

0 commit comments

Comments
 (0)