Skip to content

Commit

Permalink
Renamed completeWithAsync to completeWithTask (#221)
Browse files Browse the repository at this point in the history
* Renamed EventLoopPromise's `completeWithAsync` to `completeWithTask` (based on the SwiftNIO renaming)
* Updated swift-nio dependency to 2.32.0
  • Loading branch information
Joel Saltzman authored and fabianfett committed Aug 24, 2021
1 parent a9e15b1 commit f9d10b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.30.0")),
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.32.0")),
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.4.2")),
.package(url: "https://github.com/swift-server/swift-backtrace.git", .upToNextMajor(from: "1.2.3")),
],
Expand Down
4 changes: 2 additions & 2 deletions Sources/AWSLambdaRuntimeCore/LambdaHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public protocol AsyncLambdaHandler: EventLoopLambdaHandler {
extension AsyncLambdaHandler {
public func handle(context: Lambda.Context, event: In) -> EventLoopFuture<Out> {
let promise = context.eventLoop.makePromise(of: Out.self)
promise.completeWithAsync {
promise.completeWithTask {
try await self.handle(event: event, context: context)
}
return promise.futureResult
Expand All @@ -126,7 +126,7 @@ extension AsyncLambdaHandler {
public static func main() {
Lambda.run { context -> EventLoopFuture<ByteBufferLambdaHandler> in
let promise = context.eventLoop.makePromise(of: ByteBufferLambdaHandler.self)
promise.completeWithAsync {
promise.completeWithTask {
try await Self(context: context)
}
return promise.futureResult
Expand Down

0 comments on commit f9d10b2

Please sign in to comment.