From 7bddcdd26d5d5a479bee8d9a6dec200e06a5dcdd Mon Sep 17 00:00:00 2001
From: Steve Klabnik
Note that we added a type annotation here. Since we don't actually do anything with the vector, Rust doesn't know what kind of elements we intend to -store. This is an important point. Vectors are homogenous: they may store many +store. This is an important point. Vectors are homogeneous: they may store many values, but those values must all be the same type. Vectors are generic over the type stored inside them (we'll talk about Generics more thoroughly in Chapter 10), and the angle brackets here tell Rust that this vector will hold diff --git a/ch08-02-strings.html b/ch08-02-strings.html index dd949624c..7adbe2c02 100644 --- a/ch08-02-strings.html +++ b/ch08-02-strings.html @@ -244,7 +244,7 @@ let answer = &h[0];
What should the value of answer be? Should it be З, the first letter? When
encoded in UTF-8, the first byte of З is 208, and the second is 151. So
should answer be 208? 208 is not a valid character on its own, though.
-Plus, for latin letters, this would not return the answer most people would
+Plus, for Latin letters, this would not return the answer most people would
expect: &"hello"[0] would then return 104, not h.
This leads to another point about UTF-8: there are really three relevant ways
diff --git a/ch08-03-hash-maps.html b/ch08-03-hash-maps.html
index 2e3438d4c..ed6db2d48 100644
--- a/ch08-03-hash-maps.html
+++ b/ch08-03-hash-maps.html
@@ -92,7 +92,7 @@ macro to construct them, for example, and they're not in the prelude, so we
need to add a use statement for them.
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
-homogenous: all of the keys must have the same type, and all of the values must
+homogeneous: all of the keys must have the same type, and all of the values must
have the same type.
If we have a vector of tuples, we can convert it into a hash map with the
collect method. The first element in each tuple will be the key, and the
diff --git a/print.html b/print.html
index 1e8202529..9c20d7bba 100644
--- a/print.html
+++ b/print.html
@@ -4897,7 +4897,7 @@ the values next to each other in memory.
Note that we added a type annotation here. Since we don't actually do anything with the vector, Rust doesn't know what kind of elements we intend to -store. This is an important point. Vectors are homogenous: they may store many +store. This is an important point. Vectors are homogeneous: they may store many values, but those values must all be the same type. Vectors are generic over the type stored inside them (we'll talk about Generics more thoroughly in Chapter 10), and the angle brackets here tell Rust that this vector will hold @@ -5227,7 +5227,7 @@ let answer = &h[0];
What should the value of answer be? Should it be З, the first letter? When
encoded in UTF-8, the first byte of З is 208, and the second is 151. So
should answer be 208? 208 is not a valid character on its own, though.
-Plus, for latin letters, this would not return the answer most people would
+Plus, for Latin letters, this would not return the answer most people would
expect: &"hello"[0] would then return 104, not h.
This leads to another point about UTF-8: there are really three relevant ways
@@ -5336,7 +5336,7 @@ macro to construct them, for example, and they're not in the prelude, so we
need to add a use statement for them.
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
-homogenous: all of the keys must have the same type, and all of the values must
+homogeneous: all of the keys must have the same type, and all of the values must
have the same type.
If we have a vector of tuples, we can convert it into a hash map with the
collect method. The first element in each tuple will be the key, and the