Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed Dec 13, 2024
1 parent cbc110b commit aa646a8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Sources/NIOAsyncAwaitDemo/AsyncChannelIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ struct AsyncChannelIO<Request, Response> {

func start() async throws -> AsyncChannelIO<Request, Response> {
try await channel.eventLoop.submit {
try channel.pipeline.syncOperations.addHandler(RequestResponseHandler<HTTPRequestHead, NIOHTTPClientResponseFull>())
try channel.pipeline.syncOperations.addHandler(
RequestResponseHandler<HTTPRequestHead, NIOHTTPClientResponseFull>()
)
}.get()
return self
}
Expand Down
20 changes: 16 additions & 4 deletions Tests/NIOPosixTests/RawSocketBootstrapTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<ByteBuffer>(), name: "ByteReadRecorder")
try channel.pipeline.syncOperations.addHandler(
DatagramReadRecorder<ByteBuffer>(),
name: "ByteReadRecorder"
)
}
}
.bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait()
Expand Down Expand Up @@ -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<ByteBuffer>(), name: "ByteReadRecorder")
try channel.pipeline.syncOperations.addHandler(
DatagramReadRecorder<ByteBuffer>(),
name: "ByteReadRecorder"
)
}
}
.bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait()
Expand All @@ -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<ByteBuffer>(), name: "ByteReadRecorder")
try channel.pipeline.syncOperations.addHandler(
DatagramReadRecorder<ByteBuffer>(),
name: "ByteReadRecorder"
)
}
}
.bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait()
Expand Down Expand Up @@ -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<ByteBuffer>(), name: "ByteReadRecorder")
try channel.pipeline.syncOperations.addHandler(
DatagramReadRecorder<ByteBuffer>(),
name: "ByteReadRecorder"
)
}
}
.bind(host: "127.0.0.1", ipProtocol: .reservedForTesting).wait()
Expand Down
6 changes: 5 additions & 1 deletion Tests/NIOPosixTests/UniversalBootstrapSupportTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aa646a8

Please sign in to comment.