I have a hashmap: [("a", 1), ("b", 2), ("c", 3)], now I want to use iter_mut() method to double each of the value. However, the example uses a loop.
Like this:
for (_, val) in map.iter_mut() { *val *= 2; }
how can I do the same thing without the for loop?