@@ -179,7 +179,7 @@ Adding `rand` as a dependency in *Cargo.toml* tells Cargo to download the
179
179
make ` rand ` available to our project.
180
180
181
181
Then, to bring ` rand ` definitions into the scope of our package, we added a
182
- ` use ` line starting with the name of the package , ` rand ` , and listed the items
182
+ ` use ` line starting with the name of the crate , ` rand ` , and listed the items
183
183
we wanted to bring into scope. Recall that in the [ “Generating a Random
184
184
Number”] [ rand ] <!-- ignore --> section in Chapter 2, we brought the ` Rng ` trait
185
185
into scope and called the ` rand::thread_rng ` function:
@@ -191,7 +191,7 @@ into scope and called the `rand::thread_rng` function:
191
191
Members of the Rust community have made many packages available at
192
192
[ crates.io] ( https://crates.io/ ) , and pulling any of them into your package
193
193
involves these same steps: listing them in your package’s * Cargo.toml* file and
194
- using ` use ` to bring items into scope.
194
+ using ` use ` to bring items from their crates into scope.
195
195
196
196
Note that the standard library (` std ` ) is also a crate that’s external to our
197
197
package. Because the standard library is shipped with the Rust language, we
@@ -208,7 +208,7 @@ crate.
208
208
209
209
### Using Nested Paths to Clean Up Large ` use ` Lists
210
210
211
- If we’re using multiple items defined in the same package or same module,
211
+ If we’re using multiple items defined in the same crate or same module,
212
212
listing each item on its own line can take up a lot of vertical space in our
213
213
files. For example, these two ` use ` statements we had in the Guessing Game in
214
214
Listing 2-4 bring items from ` std ` into scope:
@@ -233,7 +233,7 @@ differ, as shown in Listing 7-18.
233
233
<span class =" caption " >Listing 7-18: Specifying a nested path to bring multiple
234
234
items with the same prefix into scope</span >
235
235
236
- In bigger programs, bringing many items into scope from the same package or
236
+ In bigger programs, bringing many items into scope from the same crate or
237
237
module using nested paths can reduce the number of separate ` use ` statements
238
238
needed by a lot!
239
239
0 commit comments