Open adam-fowler opened 8 months ago
It appears the consensus around the SwiftNIO team is to use a with...() { }
type method for these stuff.
See: https://github.com/swift-server/async-http-client/issues/752
(I'm taking a guess at what you mean by this issue, so disregard this comment if what I mentioned is unrelated)
@MahdiBM I'm guessing something like this
var writerCopy: ResponseBodyWriter
let response = Response(
status: .ok,
body: .init { writer in
writerCopy = writer
}
)
try await writerCopy.write(anotherByteBuffer)
Can we add a swift 6 conditional conformance to
~Escapable