Skip to content

Commit 8862183

Browse files
authored
you we distinction (#14829)
Cleaning up the usage of we vs you in the guide section of the book for greater consistency and clarity. You should now refer to the reader and we to the authors of the book
2 parents 69e5959 + b0d3de5 commit 8862183

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

src/doc/src/guide/cargo-toml-vs-cargo-lock.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ We recommend pairing this with
1616

1717
Let’s dig in a little bit more.
1818

19-
`Cargo.toml` is a [**manifest**][def-manifest] file in which we can specify a
20-
bunch of different metadata about our package. For example, we can say that we
19+
`Cargo.toml` is a [**manifest**][def-manifest] file in which you can specify a
20+
bunch of different metadata about your package. For example, you can say that you
2121
depend on another package:
2222

2323
```toml
@@ -29,31 +29,31 @@ version = "0.1.0"
2929
regex = { git = "https://github.com/rust-lang/regex.git" }
3030
```
3131

32-
This package has a single dependency, on the `regex` library. We’ve stated in
33-
this case that we’re relying on a particular Git repository that lives on
34-
GitHub. Since we haven’t specified any other information, Cargo assumes that
35-
we intend to use the latest commit on the default branch to build our package.
32+
This package has a single dependency, on the `regex` library. It states in
33+
this case to rely on a particular Git repository that lives on
34+
GitHub. Since you haven’t specified any other information, Cargo assumes that
35+
you intend to use the latest commit on the default branch to build our package.
3636

3737
Sound good? Well, there’s one problem: If you build this package today, and
3838
then you send a copy to me, and I build this package tomorrow, something bad
3939
could happen. There could be more commits to `regex` in the meantime, and my
4040
build would include new commits while yours would not. Therefore, we would
4141
get different builds. This would be bad because we want reproducible builds.
4242

43-
We could fix this problem by defining a specific `rev` value in our `Cargo.toml`,
43+
You could fix this problem by defining a specific `rev` value in our `Cargo.toml`,
4444
so Cargo could know exactly which revision to use when building the package:
4545

4646
```toml
4747
[dependencies]
4848
regex = { git = "https://github.com/rust-lang/regex.git", rev = "9f9f693" }
4949
```
5050

51-
Now our builds will be the same. But there’s a big drawback: now we have to
52-
manually think about SHA-1s every time we want to update our library. This is
51+
Now our builds will be the same. But there’s a big drawback: now you have to
52+
manually think about SHA-1s every time you want to update our library. This is
5353
both tedious and error prone.
5454

55-
Enter the `Cargo.lock`. Because of its existence, we don’t need to manually
56-
keep track of the exact revisions: Cargo will do it for us. When we have a
55+
Enter the `Cargo.lock`. Because of its existence, you don’t need to manually
56+
keep track of the exact revisions: Cargo will do it for you. When you have a
5757
manifest like this:
5858

5959
```toml
@@ -65,8 +65,8 @@ version = "0.1.0"
6565
regex = { git = "https://github.com/rust-lang/regex.git" }
6666
```
6767

68-
Cargo will take the latest commit and write that information out into our
69-
`Cargo.lock` when we build for the first time. That file will look like this:
68+
Cargo will take the latest commit and write that information out into your
69+
`Cargo.lock` when you build for the first time. That file will look like this:
7070

7171
```toml
7272
[[package]]
@@ -83,12 +83,12 @@ source = "git+https://github.com/rust-lang/regex.git#9f9f693768c584971a4d53bc3c5
8383
```
8484

8585
You can see that there’s a lot more information here, including the exact
86-
revision we used to build. Now when you give your package to someone else,
87-
they’ll use the exact same SHA, even though we didn’t specify it in our
86+
revision you used to build. Now when you give your package to someone else,
87+
they’ll use the exact same SHA, even though you didn’t specify it in your
8888
`Cargo.toml`.
8989

90-
When we’re ready to opt in to a new version of the library, Cargo can
91-
re-calculate the dependencies and update things for us:
90+
When you're ready to opt in to a new version of the library, Cargo can
91+
re-calculate the dependencies and update things for you:
9292

9393
```console
9494
$ cargo update # updates all dependencies

src/doc/src/guide/creating-a-new-project.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn main() {
4747
}
4848
```
4949

50-
Cargo generated a “hello world” program for us, otherwise known as a
50+
Cargo generated a “hello world” program for you, otherwise known as a
5151
[*binary crate*][def-crate]. Let’s compile it:
5252

5353
```console
@@ -62,7 +62,7 @@ $ ./target/debug/hello_world
6262
Hello, world!
6363
```
6464

65-
We can also use `cargo run` to compile and then run it, all in one step (You
65+
You can also use `cargo run` to compile and then run it, all in one step (You
6666
won't see the `Compiling` line if you have not made any changes since you last
6767
compiled):
6868

@@ -73,8 +73,8 @@ $ cargo run
7373
Hello, world!
7474
```
7575

76-
You’ll now notice a new file, `Cargo.lock`. It contains information about our
77-
dependencies. Since we don’t have any yet, it’s not very interesting.
76+
You’ll now notice a new file, `Cargo.lock`. It contains information about your
77+
dependencies. Since there are none yet, it’s not very interesting.
7878

7979
Once you’re ready for release, you can use `cargo build --release` to compile
8080
your files with optimizations turned on:

src/doc/src/guide/dependencies.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ the options you have here.
2626

2727
[SemVer]: https://semver.org
2828

29-
If we also wanted to add a dependency on the `regex` crate, we would not need
29+
If you also wanted to add a dependency on the `regex` crate, you would not need
3030
to add `[dependencies]` for each crate listed. Here's what your whole
3131
`Cargo.toml` file would look like with dependencies on the `time` and `regex`
3232
crates:
@@ -63,11 +63,11 @@ $ cargo build
6363
Compiling hello_world v0.1.0 (file:///path/to/package/hello_world)
6464
```
6565

66-
Our `Cargo.lock` contains the exact information about which revision of all of
67-
these dependencies we used.
66+
`Cargo.lock` contains the exact information about which revision was used
67+
for all of these dependencies.
6868

69-
Now, if `regex` gets updated, we will still build with the same revision until
70-
we choose to run `cargo update`.
69+
Now, if `regex` gets updated, you will still build with the same revision until
70+
you choose to run `cargo update`.
7171

7272
You can now use the `regex` library in `main.rs`.
7373

src/doc/src/guide/tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ running 0 tests
2020
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2121
```
2222

23-
If our package had tests, we would see more output with the correct number of
23+
If your package had tests, you would see more output with the correct number of
2424
tests.
2525

2626
You can also run a specific test by passing a filter:

src/doc/src/guide/why-cargo-exists.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ $ ./hello
1414
Hello, world!
1515
```
1616

17-
Note that the above command required that we specify the file name
18-
explicitly. If we were to directly use `rustc` to compile a different program,
19-
a different command line invocation would be required. If we needed to specify
17+
Note that the above command required that you specify the file name
18+
explicitly. If you were to directly use `rustc` to compile a different program,
19+
a different command line invocation would be required. If you needed to specify
2020
any specific compiler flags or include external dependencies, then the
2121
needed command would be even more specific (and complex).
2222

@@ -26,7 +26,7 @@ dependencies. Obtaining the correct versions of all the necessary dependencies
2626
and keeping them up to date would be hard and error-prone if done by
2727
hand.
2828

29-
Rather than work only with crates and `rustc`, we can avoid the difficulties
29+
Rather than work only with crates and `rustc`, you can avoid the difficulties
3030
involved with performing the above tasks by introducing a higher-level
3131
["*package*"][def-package] abstraction and by using a
3232
[*package manager*][def-package-manager].
@@ -49,11 +49,11 @@ To a large extent, Cargo normalizes the commands needed to build a given
4949
program or library; this is one aspect to the above mentioned conventions. As
5050
we show later, the same command can be used to build different
5151
[*artifacts*][def-artifact], regardless of their names. Rather than invoke
52-
`rustc` directly, we can instead invoke something generic such as `cargo
52+
`rustc` directly, you can instead invoke something generic such as `cargo
5353
build` and let cargo worry about constructing the correct `rustc`
5454
invocation. Furthermore, Cargo will automatically fetch any dependencies
55-
we have defined for our artifact from a [*registry*][def-registry],
56-
and arrange for them to be added into our build as needed.
55+
you have defined for your artifact from a [*registry*][def-registry],
56+
and arrange for them to be added into your build as needed.
5757

5858
It is only a slight exaggeration to say that once you know how to build one
5959
Cargo-based project, you know how to build *all* of them.

0 commit comments

Comments
 (0)