Skip to content

Commit c768373

Browse files
added hashmap part 1
1 parent 96b3582 commit c768373

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

examples/07_hashmap_part_1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::HashMap;
22

33
fn main() {
44
let mut scores: HashMap<String, i32> = HashMap::new();
5-
println!("empty map: {:?}, scores");
5+
println!("empty map: {:?}", scores);
66

77
// PART 2: Insert, Get, Remove
88

@@ -77,7 +77,7 @@ fn main() {
7777
}
7878

7979
// Loop over just values
80-
prontln!("values: ");
80+
println!("values: ");
8181
for value in ages.values() {
8282
println!(" {}", value);
8383
}

examples/08_hashmap_part_2.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
fn main(){
4+
5+
}

0 commit comments

Comments
 (0)