use std::collections::HashMap; fn main() { let mut hash = HashMap::new(); hash.insert(\"Daniel\", \"798-1364\"); println!(\"{}\", hash); }
Rust 1.32 introduced the dbg macro:
use std::collections::HashMap; fn main() { let mut hash = HashMap::new(); hash.insert("Daniel", "798-1364"); dbg!(hash); }
This will print:
[src/main.rs:6] hash = { "Daniel": "798-1364" }