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

Don't use MutableKeys to set the new world name. #353

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

sunfishcode
Copy link
Member

The MutableKeys trait requires that the new key have the same hash value as the old key. Since that's not true when we're changing a world name, rebuild a new IndexMap instead, to avoid perterbing the key order.

The [`MutableKeys` trait] requires that the new key have the same hash
value as the old key. Since that's not true when we're changing a world
name, rebuild a new `IndexMap` instead, to avoid perterbing the key
order.

[`MutableKeys` trait]: https://docs.rs/indexmap/latest/indexmap/map/trait.MutableKeys.html
@calvinrp calvinrp merged commit 96cb023 into bytecodealliance:main Nov 15, 2024
6 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/updates branch November 15, 2024 14:37
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