From 4409b57d4c0c40d41ac2b320fccf02e4d451e3db Mon Sep 17 00:00:00 2001 From: Christian Priebe Date: Wed, 22 Jan 2020 15:13:34 +0000 Subject: [PATCH] Rename misnamed closure parameter argument in ServerBootstrap.bind0 (#1347) Motivation: Non-functional change: `bind0(_ makeSocketAddress: () throws -> SocketAddress) -> EventLoopFuture` 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 --- Sources/NIO/Bootstrap.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/NIO/Bootstrap.swift b/Sources/NIO/Bootstrap.swift index fbbab82071..0cab07f394 100644 --- a/Sources/NIO/Bootstrap.swift +++ b/Sources/NIO/Bootstrap.swift @@ -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) }