Another learning about the fantastic dbg! macro: always pass vars as references! This works: let mut s = String::from("hello"); dbg!(&s); s.push_str(", world!"); dbg!(&s); This fails: let mut s = String::from("hello"); dbg!(s); s.push_str(", world!"); dbg!(s);