Skip to content
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

ref(api): Remove unnecessary collect #2333

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

szokeasaurusrex
Copy link
Member

Since we only use the Vec created by the collect in the loop below, there is no reason for the collect. Removing the collect prevents an unnecessary allocation of the Vec, and allows the loop instead to lazily compute the stringified chunks during iteration

Since we only use the `Vec` created by the `collect` in the loop below, there is no reason for the collect. Removing the collect prevents an unnecessary allocation of the `Vec`, and allows the loop instead to lazily compute the stringified chunks during iteration
@szokeasaurusrex szokeasaurusrex merged commit ace07ee into master Jan 7, 2025
14 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/remove-collect branch January 7, 2025 10:31
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

Successfully merging this pull request may close these issues.

2 participants