Rust didn't break the API of HashMap. The trick is that the STL decided that certain algorithmic requirements were a part of the interface. For std::map, the case here is that it must be sorted. Its API also means you can't be polymorphic over a hashing strategy. This constrains possible valid algorithms. Rust made the opposite choices.
And so they did exactly what you say, for that reason. std::unordered_map is a better comparison.
And so they did exactly what you say, for that reason. std::unordered_map is a better comparison.