The following code snippet does the same things in 3 ways.
use std::collections::HashMap; struct Foo { cache: HashMap, } impl Foo
You could try to add &mut on self on show_impl as in
&mut
self
show_impl
... fn show_impl(&self, what: &String) ...
So it won't get mixed.