grain
grain copied to clipboard
feat(stdlib): Add ability to set seed on `Hash.hash`
This pr adds the ability to set the seed of the hashing function.
I think it might be worth pinning the seed when this is used in Map and Set, which would make marshalling the values work between two separate runs.
I updated this, due to the issue I ran into above I decided to go with the approach @phated had suggested at first.
I also rewrote the hashing function to avoid a mutable global. while this wasn't necessary I think it reduces the surface area for bugs to pop up.
This should be done in a non-breaking way so I'm updating the title
Closing in favour of #2170