mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
Adopt Sendable for types in NIOHTTP1 (#2213)
This commit is contained in:
1 parent
f4b0d661c1
commit
0abf7eb929
8 files changed
+66
-11
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user