From 6598d3abac05ed1d0c45db92466ea49346d05e40 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 23 Jun 2019 11:26:10 +0200 Subject: [PATCH] Avoid mixing up the words elements and array/items. --- src/ch03-02-data-types.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ch03-02-data-types.md b/src/ch03-02-data-types.md index 4bd7091052..482e69f73f 100644 --- a/src/ch03-02-data-types.md +++ b/src/ch03-02-data-types.md @@ -318,7 +318,7 @@ vector. Chapter 8 discusses vectors in more detail. An example of when you might want to use an array rather than a vector is in a program that needs to know the names of the months of the year. It’s very unlikely that such a program will need to add or remove months, so you can use -an array because you know it will always contain 12 items: +an array because you know it will always contain 12 elements: ```rust let months = ["January", "February", "March", "April", "May", "June", "July", @@ -334,7 +334,7 @@ let a: [i32; 5] = [1, 2, 3, 4, 5]; ``` Here, `i32` is the type of each element. After the semicolon, the number `5` -indicates the element contains five items. +indicates the array contains five elements. Writing an array’s type this way looks similar to an alternative syntax for initializing an array: if you want to create an array that contains the same