Skip to content

Commit e4018f2

Browse files
authored
Merge pull request #2349 from rust-lang/steveklabnik-patch-1
Make some statements about crates more correct
2 parents e8a4714 + 939098d commit e4018f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ch07-04-bringing-paths-into-scope-with-the-use-keyword.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Adding `rand` as a dependency in *Cargo.toml* tells Cargo to download the
179179
make `rand` available to our project.
180180

181181
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
183183
we wanted to bring into scope. Recall that in the [“Generating a Random
184184
Number”][rand]<!-- ignore --> section in Chapter 2, we brought the `Rng` trait
185185
into scope and called the `rand::thread_rng` function:
@@ -191,7 +191,7 @@ into scope and called the `rand::thread_rng` function:
191191
Members of the Rust community have made many packages available at
192192
[crates.io](https://crates.io/), and pulling any of them into your package
193193
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.
195195

196196
Note that the standard library (`std`) is also a crate that’s external to our
197197
package. Because the standard library is shipped with the Rust language, we
@@ -208,7 +208,7 @@ crate.
208208

209209
### Using Nested Paths to Clean Up Large `use` Lists
210210

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,
212212
listing each item on its own line can take up a lot of vertical space in our
213213
files. For example, these two `use` statements we had in the Guessing Game in
214214
Listing 2-4 bring items from `std` into scope:
@@ -233,7 +233,7 @@ differ, as shown in Listing 7-18.
233233
<span class="caption">Listing 7-18: Specifying a nested path to bring multiple
234234
items with the same prefix into scope</span>
235235

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
237237
module using nested paths can reduce the number of separate `use` statements
238238
needed by a lot!
239239

0 commit comments

Comments
 (0)