Skip to content

Commit 7a4484f

Browse files
authored
create bar project in cargo/dependencies example (#1606)
By creating the `bar` project, the sample configuration file that references a local `bar` project will be valid.
1 parent 640d785 commit 7a4484f

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/cargo/deps.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ To create a new Rust project,
1111
# A binary
1212
cargo new foo
1313

14-
# OR A library
15-
cargo new --lib foo
14+
# A library
15+
cargo new --lib bar
1616
```
1717

1818
For the rest of this chapter, let's assume we are making a binary, rather than
@@ -21,14 +21,19 @@ a library, but all of the concepts are the same.
2121
After the above commands, you should see a file hierarchy like this:
2222

2323
```txt
24-
foo
25-
├── Cargo.toml
26-
└── src
27-
└── main.rs
24+
.
25+
├── bar
26+
│ ├── Cargo.toml
27+
│ └── src
28+
│ └── lib.rs
29+
└── foo
30+
├── Cargo.toml
31+
└── src
32+
└── main.rs
2833
```
2934

30-
The `main.rs` is the root source file for your new project -- nothing new there.
31-
The `Cargo.toml` is the config file for `cargo` for this project (`foo`). If you
35+
The `main.rs` is the root source file for your new `foo` project -- nothing new there.
36+
The `Cargo.toml` is the config file for `cargo` for this project. If you
3237
look inside it, you should see something like this:
3338

3439
```toml

0 commit comments

Comments
 (0)