mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
rename the Future's functor map function to map
This commit is contained in:
1 parent
46ac01f517
commit
af4dabb0fa
5 files changed
+8
-8
No files matched your search
@@ -22,7 +22,7 @@ private func writeChunk(wrapOutboundOut: (IOData) -> NIOAny, ctx: ChannelHandler
|
||||
case (true, .some(let p)):
|
||||
/* chunked encoding and the user's interested: we need three promises and need to cascade into the users promise */
|
||||
let (w1, w2, w3) = (ctx.eventLoop.newPromise() as EventLoopPromise<()>, ctx.eventLoop.newPromise() as EventLoopPromise<()>, ctx.eventLoop.newPromise() as EventLoopPromise<()>)
|
||||
w1.futureResult.and(w2.futureResult).and(w3.futureResult).then { _ in () }.cascade(promise: p)
|
||||
w1.futureResult.and(w2.futureResult).and(w3.futureResult).map { _ in () }.cascade(promise: p)
|
||||
(mW1, mW2, mW3) = (w1, w2, w3)
|
||||
case (false, .some(let p)):
|
||||
/* not chunked, so just use the user's promise for the actual data */
|
||||
|
||||
Reference in new issue
Block a user