Hacker News new | ask | show | jobs
by nindalf 2083 days ago
Why does hyper pull in hashbrown? Isn't it identical to std::collections::HashMap?
2 comments

I imagine that it's there because it is older than that happening. HashBrown's README says

> Since Rust 1.36, this is now the HashMap implementation for the Rust standard library. However you may still want to use this crate instead since it works in environments without std, such as embedded systems and kernels.

I don't know if that use case is important to Hyper or not.

The dependency goes hyper -> h2 -> indexmap -> hashbrown, and indexmap is built on hashbrown::raw::RawTable.
Looks like the indexmap -> hashbrown dependency was added recently: https://github.com/bluss/indexmap/pull/131