mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
make factory method names start with make (#692)
Motivation: Swift naming guidelines mandate that factory methods start with `make`, like `makeSomething`. We had a few that were `newSomething`. Modifications: make all factories start with make Result: more compliant to Swift naming rules
This commit is contained in:
1 parent
cbc214938a
commit
305ee9818b
55 files changed
+364
-362
No files matched your search
@@ -20,7 +20,7 @@ private func writeChunk(wrapOutboundOut: (IOData) -> NIOAny, ctx: ChannelHandler
|
||||
switch (isChunked, promise) {
|
||||
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<Void>, ctx.eventLoop.newPromise() as EventLoopPromise<Void>, ctx.eventLoop.newPromise() as EventLoopPromise<Void>)
|
||||
let (w1, w2, w3) = (ctx.eventLoop.makePromise() as EventLoopPromise<Void>, ctx.eventLoop.makePromise() as EventLoopPromise<Void>, ctx.eventLoop.makePromise() as EventLoopPromise<Void>)
|
||||
w1.futureResult.and(w2.futureResult).and(w3.futureResult).map { (_: ((((), ()), ()))) in }.cascade(promise: p)
|
||||
(mW1, mW2, mW3) = (w1, w2, w3)
|
||||
case (false, .some(let p)):
|
||||
|
||||
Reference in new issue
Block a user