Skip to content

Commit

Permalink
Rename misnamed closure parameter argument in ServerBootstrap.bind0 (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
cpriebe and weissi committed Jan 22, 2020
1 parent 03d90a6 commit 4409b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/NIO/Bootstrap.swift
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4409b57

Please sign in to comment.