Skip to content

Commit 2702cb0

Browse files
committed
SwiftFormat
1 parent 76ae6ac commit 2702cb0

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

Sources/AsyncHTTPClient/AsyncAwait/HTTPClientRequest.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ extension HTTPClientRequest.Body {
7474
return allocator.buffer(bytes: bytes)
7575
})
7676
}
77-
77+
7878
@inlinable
7979
public static func bytes<Bytes: Sequence>(
8080
length: Length,
@@ -92,7 +92,7 @@ extension HTTPClientRequest.Body {
9292
return allocator.buffer(bytes: bytes)
9393
})
9494
}
95-
95+
9696
@inlinable
9797
public static func bytes<Bytes: Collection>(
9898
length: Length,
@@ -164,7 +164,7 @@ extension HTTPClientRequest.Body {
164164
public static func fixed(_ count: Int) -> Self {
165165
.init(storage: .fixed(count))
166166
}
167-
167+
168168
@usableFromInline
169169
internal var storage: RequestBodyLength
170170
}

Sources/AsyncHTTPClient/ConnectionPool/RequestBodyLength.swift

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
1615
/// - Note: use `HTTPClientRequest.Body.Length` if you want to expose `RequestBodyLength` publicly
1716
@usableFromInline
1817
internal enum RequestBodyLength: Hashable {

Tests/AsyncHTTPClientTests/AsyncAwaitEndToEndTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ final class AsyncAwaitEndToEndTests: XCTestCase {
257257
ByteBuffer(string: "2"),
258258
ByteBuffer(string: "34"),
259259
]
260-
let bodyIterator = response.body.makeAsyncIterator()
260+
var bodyIterator = response.body.makeAsyncIterator()
261261
for expectedFragment in fragments {
262262
streamWriter.write(expectedFragment)
263263
guard let actualFragment = await XCTAssertNoThrowWithResult(
@@ -300,7 +300,7 @@ final class AsyncAwaitEndToEndTests: XCTestCase {
300300
ByteBuffer(string: String(repeating: "c", count: 4000)),
301301
ByteBuffer(string: String(repeating: "d", count: 4000)),
302302
]
303-
let bodyIterator = response.body.makeAsyncIterator()
303+
var bodyIterator = response.body.makeAsyncIterator()
304304
for expectedFragment in fragments {
305305
streamWriter.write(expectedFragment)
306306
guard let actualFragment = await XCTAssertNoThrowWithResult(

Tests/AsyncHTTPClientTests/HTTPClientRequestTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ extension Optional where Wrapped == HTTPClientRequest.Body {
500500
return buffer
501501
case .sequence(let announcedLength, _, let generate):
502502
let buffer = generate(ByteBufferAllocator())
503-
if case let .fixed(announcedLength) = announcedLength,
503+
if case .fixed(let announcedLength) = announcedLength,
504504
announcedLength != buffer.readableBytes {
505505
throw LengthMismatch(announcedLength: announcedLength, actualLength: buffer.readableBytes)
506506
}
@@ -510,7 +510,7 @@ extension Optional where Wrapped == HTTPClientRequest.Body {
510510
while var buffer = try await generate(ByteBufferAllocator()) {
511511
accumulatedBuffer.writeBuffer(&buffer)
512512
}
513-
if case let .fixed(announcedLength) = announcedLength,
513+
if case .fixed(let announcedLength) = announcedLength,
514514
announcedLength != accumulatedBuffer.readableBytes {
515515
throw LengthMismatch(announcedLength: announcedLength, actualLength: accumulatedBuffer.readableBytes)
516516
}

0 commit comments

Comments
 (0)