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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace HashMap with Vec in negotiate_languages #12

Closed
wants to merge 1 commit into from
Closed

Replace HashMap with Vec in negotiate_languages #12

wants to merge 1 commit into from

Conversation

lambda-fairy
Copy link

According to @cmyr, this reduces the size of druid from 850.5KiB to 841.7KiB.

This is a slight change in behavior: if two entries have the same language ID, now both entries will be returned instead of the first one. I think the new behavior is preferable though.

I'll leave it up to you to decide whether this is a breaking change 馃檪

Partially addresses projectfluent/fluent-rs#139

This is a slight change in behavior: if two entries have the same
language ID, now both entries will be returned instead of the first one.
I think the new behavior is preferable though.
@zbraniecki
Copy link
Collaborator

I just landed a switch very similar to your PR! The only difference is that I use &LanguageIdentifier instead of LanguageIdentifier in the Vec.

Let me know if you think it's better to clone!

@lambda-fairy
Copy link
Author

Thanks! I'll close this then.

@lambda-fairy lambda-fairy deleted the remove-hashmap branch August 27, 2021 12:00
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.

None yet

2 participants