rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
52.69k stars 10.02k forks source link

Remove dependency on hashbrown #2074

Closed senekor closed 1 month ago

senekor commented 1 month ago

Hashbrown is already the standard implementation of Hash{Map,Set} in the standard library.

mo8it commented 1 month ago

I am aware of that and I appreciate trying to reduce the number of dependencies. But I use hashbrown mainly because it has ahash without a random state as the default hasher. This is not safe against hash attacks, but Rustlings doesn't need to worry about that and benefits of the improved performance.

hashbrown also has more features like entry_ref. I don't think that I use any of these additional features, but still nice to have if needed :)

If you like, you are welcome to replace hashbrown with ahash and use it as the hasher for the std collections in a new PR :D