When adding an item to a
HashMap it will be moved. I often need to access this item after this insertion which forces me to do a subsequent
get which feels cumbersome and causes another unnecessary key lookup.
Here’s my code and some failed attempts to get around the second lookup using
Is there a more idiomatic way to achieve that?