mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Workaround Sendable warning from Swift 5.7 (#2225)
Workaround for https://github.com/apple/swift/issues/59911 ```swift /src/Tests/NIOHTTP1Tests/HTTPTest.swift:148:21: warning: 'buf' mutated after capture by sendable closure buf.writeString("\(c)") ``` The variable `buf` is mutated but only before being capture by the sendable closure. All other warnings/errors are fixed with the latest Swift 5.7 toolchain
This commit is contained in:
1 parent
48916a49af
commit
b99da5d3fe
1 file changed
+1
-1
@@ -146,7 +146,7 @@ class HTTPTest: XCTestCase {
|
||||
var buf = chan.allocator.buffer(capacity: 1024)
|
||||
|
||||
buf.writeString("\(c)")
|
||||
writeFutures.append(chan.eventLoop.makeSucceededFuture(()).flatMapThrowing {
|
||||
writeFutures.append(chan.eventLoop.makeSucceededFuture(()).flatMapThrowing { [buf] in
|
||||
try chan.writeInbound(buf)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user