Skip to content
New issue

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

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

Already on GitHub? # to your account

Use retain in ItemMap::filter #932

Merged
merged 1 commit into from
Apr 14, 2024
Merged

Use retain in ItemMap::filter #932

merged 1 commit into from
Apr 14, 2024

Conversation

cuviper
Copy link
Contributor

@cuviper cuviper commented Mar 14, 2024

This mutation can be done in-place with retain on both the IndexMap and its inner Cfg(Vec) values. In addition to being simpler, it should be a little faster since it doesn't need new allocations nor re-hashing of retained items.

@emilio emilio merged commit bde8ab4 into mozilla:master Apr 14, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants