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

Use mutating collection methods #12644

Merged

Conversation

caspiano
Copy link
Contributor

@caspiano caspiano commented Oct 22, 2022

Banged collection methods (e.g. #sort! and #uniq!) save the allocation of an intermediate collection.


This is part of a handful of small PRs, each focussing on a single style issue that is unlikely to be found in other Crystal projects as they are picked up by the widely used ameba linter.

This saves the allocation of a new collection.
@straight-shoota straight-shoota added this to the 1.7.0 milestone Oct 22, 2022
@straight-shoota straight-shoota merged commit 4ff95d5 into crystal-lang:master Oct 23, 2022
lbguilherme pushed a commit to lbguilherme/crystal that referenced this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants