Skip to content

Commit

Permalink
Use makeSucceededVoidFuture in FileIO
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Mar 6, 2021
1 parent a747c21 commit 9fc3eed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-metrics.git", "1.0.0"..<"3.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.21.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.26.0"),
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.7.0"),
.package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.16.1"),
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.4.0"),
Expand Down
2 changes: 1 addition & 1 deletion Sources/HummingbirdFoundation/Files/FileIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public struct HBFileIO {
let futureResult: EventLoopFuture<Void>
switch contents {
case .byteBuffer(let buffer):
guard let buffer = buffer else { return context.eventLoop.makeSucceededFuture(()) }
guard let buffer = buffer else { return context.eventLoop.makeSucceededVoidFuture() }
futureResult = writeFile(buffer: buffer, handle: handle, on: context.eventLoop)
case .stream(let streamer):
futureResult = writeFile(stream: streamer, handle: handle, on: context.eventLoop)
Expand Down

0 comments on commit 9fc3eed

Please sign in to comment.