diff --git a/ch08-03-hash-maps.html b/ch08-03-hash-maps.html index 975965fad..050662f47 100644 --- a/ch08-03-hash-maps.html +++ b/ch08-03-hash-maps.html @@ -100,7 +100,7 @@ least often used, so it's not included in the features imported automatically in the prelude. Hash maps also have less support from the standard library; there's no built-in macro to construct them, for example.
Just like vectors, hash maps store their data on the heap. This HashMap has
-keys of type i32 and values of type &str. Like vectors, hash maps are
+keys of type &str and values of type i32. Like vectors, hash maps are
homogenous: all of the keys must have the same type, and all of the values must
have the same type.
Another way of constructing a hash map is by using the collect method on a
@@ -203,7 +203,7 @@ scores.insert(String::from("Blue"), 25);
println!("{:?}", scores);
-
This will print {"Blue": 25}. The original value of 25 has been overwritten.
This will print {"Blue": 25}. The original value of 10 has been overwritten.
It's common to want to check if a particular key has a value and, if it does not, insert a value for it. Hash maps have a special API for this, called diff --git a/print.html b/print.html index 7def0656b..548a89f1b 100644 --- a/print.html +++ b/print.html @@ -6089,7 +6089,7 @@ least often used, so it's not included in the features imported automatically in the prelude. Hash maps also have less support from the standard library; there's no built-in macro to construct them, for example.
Just like vectors, hash maps store their data on the heap. This HashMap has
-keys of type i32 and values of type &str. Like vectors, hash maps are
+keys of type &str and values of type i32. Like vectors, hash maps are
homogenous: all of the keys must have the same type, and all of the values must
have the same type.
Another way of constructing a hash map is by using the collect method on a
@@ -6192,7 +6192,7 @@ scores.insert(String::from("Blue"), 25);
println!("{:?}", scores);
-
This will print {"Blue": 25}. The original value of 25 has been overwritten.
This will print {"Blue": 25}. The original value of 10 has been overwritten.
It's common to want to check if a particular key has a value and, if it does not, insert a value for it. Hash maps have a special API for this, called