Skip to content

Commit

Permalink
Merge pull request rust-lang#1811 from tonytonyjan/patch-2
Browse files Browse the repository at this point in the history
replace `extern create rand` with `use rand`
  • Loading branch information
carols10cents authored Feb 10, 2019
2 parents e6a8894 + 9f55bd4 commit 4fc0101
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ch14-03-cargo-workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ $ cargo build
The top-level *Cargo.lock* now contains information about the dependency of
`add-one` on `rand`. However, even though `rand` is used somewhere in the
workspace, we can’t use it in other crates in the workspace unless we add
`rand` to their *Cargo.toml* files as well. For example, if we add `extern
crate rand;` to the *adder/src/main.rs* file for the `adder` crate, we’ll get
an error:
`rand` to their *Cargo.toml* files as well. For example, if we add `use rand;`
to the *adder/src/main.rs* file for the `adder` crate, we’ll get an error:

```text
$ cargo build
Expand Down

0 comments on commit 4fc0101

Please sign in to comment.