Fix chunks(countOf: 1) (#293)

This commit is contained in:
Franz Busch authored and GitHub committed 2023-09-19 17:23:38 +02:00
1 parent 4a1fb99f00
commit 281e27c5d0
2 files changed
+12

No files matched your search

@@ -49,6 +49,10 @@ public struct AsyncChunksOfCountSequence<Base: AsyncSequence, Collected: RangeRe
return nil
}
if count == 1 {
return Collected(CollectionOfOne(first))
}
var result: Collected = .init()
result.append(first)