In HashMap in std::collections - Rust
I could not find a function for doing the following:
lookup key k, if it exists, return associated value
if it does not exist, then insert default value d, and return ref to d
Is there an idiomatic way to do this in Rust?