Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an assert to wit-parser's
assert_valid
. (#1908)
Indexmap's [`MutableKeys` trait] allows one to mutate the keys in an `IndexMap`, however it doesn't prevent bugs where the new keys have different hash values from the old keys. Since I recently made this mistake, add an assert to help catch such bugs. It doesn't always catch the bug, because whether or not the bug is observable depends on hashmap internals, but it's better than nothing. [`MutableKeys` trait]: https://docs.rs/indexmap/latest/indexmap/map/trait.MutableKeys.html
- Loading branch information