I am implementing a solution to the LeetCode LRU Cache problem.
In C++, I would have a list of (key, value) tuples and an unordered_map from the key to the list iterator. The crucial property of std::list here is that when you remove a list element at a given list iterator, all other iterators remain valid.
How to implement this in Rust? Rust iterators are very unlike C++ iterators - more like the proposed ranges in C++, perhaps?