Rename misnamed closure parameter argument in ServerBootstrap.bind0 (#1347)

Motivation:

Non-functional change: `bind0(_ makeSocketAddress: () throws -> SocketAddress)
-> EventLoopFuture<Channel>` calls `bind0` with a `register` closure that is
passed an event loop as first argument. However, the name of the first parameter
of the closure declaration is named "eventGroup" which is confusing. It should
therefore be renamed to "eventLoop" which is consistent with other closures
passed as `register` arguments at other callsites.

Modifications:

Rename (unused) closure parameter "eventGroup" to "eventLoop".

Result:

Improved code readability.

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
This commit is contained in:
Christian PriebeandJohannes Weiss authored and Johannes Weiss committed 2020-01-22 15:13:34 +00:00
1 parent 03d90a6f2d
commit 4409b57d4c
1 file changed
+1 -1
+1 -1
View File
@@ -210,7 +210,7 @@ public final class ServerBootstrap {
protocolFamily: address.protocolFamily)
}
return bind0(makeServerChannel: makeChannel) { (eventGroup, serverChannel) in
return bind0(makeServerChannel: makeChannel) { (eventLoop, serverChannel) in
serverChannel.registerAndDoSynchronously { serverChannel in
serverChannel.bind(to: address)
}