Skip to content

Commit 093765b

Browse files
authored
Merge pull request #1070 from hghwng/patch-1
Improve typography
2 parents a22dcf6 + 354320d commit 093765b

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

src/cargo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ useful features to improve code quality and developer velocity! These include
99
- Awareness of benchmarks
1010

1111
This chapter will go through some quick basics, but you can find the
12-
comprehensive docs [here](http://doc.crates.io/index.html).
12+
comprehensive docs in [The Cargo Book](https://doc.rust-lang.org/cargo/).

src/cargo/conventions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ To tell `cargo` to compile or run this binary as opposed to the default or other
2929
binaries, we just pass `cargo` the `--bin my_other_bin` flag, where `my_other_bin`
3030
is the name of the binary we want to work with.
3131

32-
In addition to extra binaries, there is support for benchmarks, tests, and
33-
examples. The full capabilities are documented
34-
[here](http://doc.crates.io/book/guide/project-layout.html).
32+
In addition to extra binaries, `cargo` supports [more features] such as
33+
benchmarks, tests, and examples.
3534

3635
In the next chapter, we will look more closely at tests.
36+
37+
[more features]: https://doc.rust-lang.org/cargo/guide/project-layout.html

src/cargo/deps.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ authors = ["mark"]
4040
[dependencies]
4141
```
4242

43-
You can read more extensively about all of the available configuration options
44-
[here](http://doc.crates.io/manifest.html).
45-
4643
The `name` field under `package` determines the name of the project. This is
4744
used by `crates.io` if you publish the crate (more later). It is also the name
4845
of the output binary when you compile.
@@ -63,9 +60,8 @@ add a dependency to our program, we can simply add the following to our
6360
crate clap` in `main.rs`, just like normal. And that's it! You can start using
6461
`clap` in your program.
6562

66-
`cargo` also supports other types of dependencies. Here is just a small
67-
sampling. You can find out more
68-
[here](http://doc.crates.io/specifying-dependencies.html).
63+
`cargo` also supports [other types of dependencies][dependencies]. Here is just
64+
a small sampling:
6965

7066
```toml
7167
[package]
@@ -79,10 +75,18 @@ rand = { git = "https://github.com/rust-lang-nursery/rand" } # from online repo
7975
bar = { path = "../bar" } # from a path in the local filesystem
8076
```
8177

78+
`cargo` is more than a dependency manager. All of the available
79+
configuration options are listed in the [format specification][manifest] of
80+
`Cargo.toml`.
81+
8282
To build our project we can execute `cargo build` anywhere in the project
8383
directory (including subdirectories!). We can also do `cargo run` to build and
8484
run. Notice that these commands will resolve all dependencies, download crates
8585
if needed, and build everything, including your crate. (Note that it only
8686
rebuilds what it has not already built, similar to `make`).
8787

8888
Voila! That's all there is to it!
89+
90+
91+
[manifest]: https://doc.rust-lang.org/cargo/reference/manifest.html
92+
[dependencies]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html

src/trait/iter.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Iterators
22

3-
The `Iterator` trait is used to implement iterators over collections such as arrays.
3+
The [`Iterator`][iter] trait is used to implement iterators over collections such as arrays.
44

55
The trait requires only a method to be defined for the `next` element,
66
which may be manually defined in an `impl` block or automatically
@@ -9,9 +9,6 @@ defined (as in arrays and ranges).
99
As a point of convenience for common situations, the `for` construct
1010
turns some collections into iterators using the [`.into_iterator()`][intoiter] method.
1111

12-
Methods that can be accessed using the `Iterator` trait in addition
13-
to those shown in the example below can be found [here][iter].
14-
1512
```rust,editable
1613
struct Fibonacci {
1714
curr: u32,

src/trait/ops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ because operators are syntactic sugar for method calls. For example, the `+` ope
66
`a + b` calls the `add` method (as in `a.add(b)`). This `add` method is part of the `Add`
77
trait. Hence, the `+` operator can be used by any implementor of the `Add` trait.
88

9-
A list of the traits, such as `Add`, that overload operators is available [here][ops].
9+
A list of the traits, such as `Add`, that overload operators can be found in [`core::ops`][ops].
1010

1111
```rust,editable
1212
use std::ops;

0 commit comments

Comments
 (0)