This commit is contained in:
Jasper Ras 2026-01-15 09:09:24 +01:00
parent eb9773627e
commit 10b29ad9cb
14 changed files with 164 additions and 0 deletions

12
ch8/ch10/hash.rs Normal file
View file

@ -0,0 +1,12 @@
use std::collections::HashMap;
fn main() {
let field_name = String::from("field");
let field_value = String::from("value");
let mut map = HashMap::new();
map.insert(field_name, &field_value);
print!("{}", map.get("field").unwrap());
print!("{}", field_value);
}