From aa646a8a872dff5c18c5707fba8fabc7f27a13a2 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Fri, 13 Dec 2024 16:14:00 +0000 Subject: [PATCH] Formatting --- .../NIOAsyncAwaitDemo/AsyncChannelIO.swift | 4 +++- .../RawSocketBootstrapTests.swift | 20 +++++++++++++++---- .../UniversalBootstrapSupportTest.swift | 6 +++++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift b/Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift index a43f29aa04..5e6f04a38d 100644 --- a/Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift +++ b/Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift @@ -25,7 +25,9 @@ struct AsyncChannelIO { func start() async throws -> AsyncChannelIO { try await channel.eventLoop.submit { - try channel.pipeline.syncOperations.addHandler(RequestResponseHandler()) + try channel.pipeline.syncOperations.addHandler( + RequestResponseHandler() + ) }.get() return self } diff --git a/Tests/NIOPosixTests/RawSocketBootstrapTests.swift b/Tests/NIOPosixTests/RawSocketBootstrapTests.swift index 656cc3e4a4..a7c42c3c82 100644 --- a/Tests/NIOPosixTests/RawSocketBootstrapTests.swift +++ b/Tests/NIOPosixTests/RawSocketBootstrapTests.swift @@ -49,7 +49,10 @@ final class RawSocketBootstrapTests: XCTestCase { let channel = try NIORawSocketBootstrap(group: elg) .channelInitializer { channel in channel.eventLoop.makeCompletedFuture { - try channel.pipeline.syncOperations.addHandler(DatagramReadRecorder(), name: "ByteReadRecorder") + try channel.pipeline.syncOperations.addHandler( + DatagramReadRecorder(), + name: "ByteReadRecorder" + ) } } .bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait() @@ -97,7 +100,10 @@ final class RawSocketBootstrapTests: XCTestCase { let readChannel = try NIORawSocketBootstrap(group: elg) .channelInitializer { channel in channel.eventLoop.makeCompletedFuture { - try channel.pipeline.syncOperations.addHandler(DatagramReadRecorder(), name: "ByteReadRecorder") + try channel.pipeline.syncOperations.addHandler( + DatagramReadRecorder(), + name: "ByteReadRecorder" + ) } } .bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait() @@ -106,7 +112,10 @@ final class RawSocketBootstrapTests: XCTestCase { let writeChannel = try NIORawSocketBootstrap(group: elg) .channelInitializer { channel in channel.eventLoop.makeCompletedFuture { - try channel.pipeline.syncOperations.addHandler(DatagramReadRecorder(), name: "ByteReadRecorder") + try channel.pipeline.syncOperations.addHandler( + DatagramReadRecorder(), + name: "ByteReadRecorder" + ) } } .bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait() @@ -155,7 +164,10 @@ final class RawSocketBootstrapTests: XCTestCase { .channelOption(.ipOption(.ip_hdrincl), value: 1) .channelInitializer { channel in channel.eventLoop.makeCompletedFuture { - try channel.pipeline.syncOperations.addHandler(DatagramReadRecorder(), name: "ByteReadRecorder") + try channel.pipeline.syncOperations.addHandler( + DatagramReadRecorder(), + name: "ByteReadRecorder" + ) } } .bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait() diff --git a/Tests/NIOPosixTests/UniversalBootstrapSupportTest.swift b/Tests/NIOPosixTests/UniversalBootstrapSupportTest.swift index 4e9f8b0d84..9d729c5532 100644 --- a/Tests/NIOPosixTests/UniversalBootstrapSupportTest.swift +++ b/Tests/NIOPosixTests/UniversalBootstrapSupportTest.swift @@ -84,7 +84,11 @@ class UniversalBootstrapSupportTest: XCTestCase { let client = try NIOClientTCPBootstrap(ClientBootstrap(group: group), tls: DummyTLSProvider()) .channelInitializer { channel in channel.eventLoop.makeCompletedFuture { - try channel.pipeline.syncOperations.addHandlers(counter1, DropChannelReadsHandler(), counter2) + try channel.pipeline.syncOperations.addHandlers( + counter1, + DropChannelReadsHandler(), + counter2 + ) } } .channelOption(.autoRead, value: false)