Skip to content

Commit b0c9a77

Browse files
committed
Update use of HashMap::get to HashMap::find
Closes #3
1 parent b33b6bc commit b0c9a77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn times_two(n: uint) -> uint { n * 2 }
6060

6161
fn main() {
6262
println!("The map has {} entries.", *COUNT);
63-
println!("The entry for `0` is \"{}\".", HASHMAP.get(&0));
63+
println!("The entry for `0` is \"{}\".", HASHMAP.find(&0).unwrap());
6464
println!("A expensive calculation on a static results in: {}.", *NUMBER);
6565
}
6666
```

src/lazy_static.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn times_two(n: uint) -> uint { n * 2 }
5656
5757
fn main() {
5858
println!("The map has {} entries.", *COUNT);
59-
println!("The entry for `0` is \"{}\".", HASHMAP.get(&0));
59+
println!("The entry for `0` is \"{}\".", HASHMAP.find(&0).unwrap());
6060
println!("A expensive calculation on a static results in: {}.", *NUMBER);
6161
}
6262
```

0 commit comments

Comments
 (0)