mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-25 04:27:48 +00:00
Fix typo in Guides/Chunked.md (#277)
This commit is contained in:
1 parent
07a0c1ee08
commit
df46b4c235
1 file changed
+1
-1
@@ -213,7 +213,7 @@ If both count and signal are specified, the chunking asynchronous sequence emits
|
||||
Like the example above, this code emits up to 1024-byte `Data` instances, but a chunk will also be emitted every second.
|
||||
|
||||
```swift
|
||||
let packets = bytes.chunks(ofCount: 1024 or: .repeating(every: .seconds(1)), into: Data.self)
|
||||
let packets = bytes.chunks(ofCount: 1024, or: .repeating(every: .seconds(1)), into: Data.self)
|
||||
for try await packet in packets {
|
||||
write(packet)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user