Adopt Sendable for types in NIOHTTP1 (#2213)

This commit is contained in:
David Nadoba authored and GitHub committed 2022-07-04 00:37:23 -07:00
1 parent f4b0d661c1
commit 0abf7eb929
8 files changed
+66 -11

No files matched your search

+10
View File
@@ -166,6 +166,11 @@ public final class HTTPRequestEncoder: ChannelOutboundHandler, RemovableChannelH
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension HTTPRequestEncoder: Sendable {}
#endif
/// A `ChannelOutboundHandler` that can serialize HTTP responses.
///
/// This channel handler is used to translate messages from a series of
@@ -198,6 +203,11 @@ public final class HTTPResponseEncoder: ChannelOutboundHandler, RemovableChannel
}
}
#if swift(>=5.6)
@available(*, unavailable)
extension HTTPResponseEncoder: Sendable {}
#endif
private extension ByteBuffer {
private mutating func write(status: HTTPResponseStatus) {
self.writeString(String(status.code))