Skip to content

AsyncChunksOfCountSequence does not create chunks of 1 element each. #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
knovichikhin opened this issue Jun 10, 2023 · 1 comment
Closed

Comments

@knovichikhin
Copy link

AsyncChunksOfCountSequence does not create chunks of 1 element each. Instead it creates 1 chunk of all elements.

for await chunk in ["1", "2", "3"].async.chunks(ofCount: 1) {
    print(chunk)
}

Output:

["1", "2", "3"]

Likely due to this line not checking that result.count == count:

@FranzBusch
Copy link
Member

This PR should fix it: #293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants