From b4d9e61a6da0536d40ea0d026e1fe4d8f0f555cb Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Fri, 28 Jul 2023 11:11:31 +0100 Subject: [PATCH] Fix 5.6 compiler error (#182) # Motivation After my recent PR we failed to compile on 5.6 since the compiler isn't capable to infer the return type of one of the closures. # Modification This PR adds the closure's return type explicitly. # Result Compiling on 5.6 again --- Tests/NIOTransportServicesTests/NIOTSAsyncBootstrapTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/NIOTransportServicesTests/NIOTSAsyncBootstrapTests.swift b/Tests/NIOTransportServicesTests/NIOTSAsyncBootstrapTests.swift index 39eeb40..d83b6da 100644 --- a/Tests/NIOTransportServicesTests/NIOTSAsyncBootstrapTests.swift +++ b/Tests/NIOTransportServicesTests/NIOTSAsyncBootstrapTests.swift @@ -185,7 +185,7 @@ final class AsyncChannelBootstrapTests: XCTestCase { .bind( host: "127.0.0.1", port: 0 - ) { channel in + ) { channel -> EventLoopFuture> in channel.eventLoop.makeCompletedFuture { try channel.pipeline.syncOperations.addHandler(ByteToMessageHandler(LineDelimiterCoder())) try channel.pipeline.syncOperations.addHandler(MessageToByteHandler(LineDelimiterCoder()))