Skip to content

Commit 3a6dbb3

Browse files
committed
Be consistent about what is a "chapter" versus a "section"
1 parent 936678a commit 3a6dbb3

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

src/doc/book/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Even then, Rust still allows precise control like a low-level language would.
1414

1515
[rust]: https://www.rust-lang.org
1616

17-
“The Rust Programming Language” is split into sections. This introduction
17+
“The Rust Programming Language” is split into chapters. This introduction
1818
is the first. After this:
1919

2020
* [Getting started][gs] - Set up your computer for Rust development.

src/doc/book/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ different.
208208

209209
Rust’s implementation of closures is a bit different than other languages. They
210210
are effectively syntax sugar for traits. You’ll want to make sure to have read
211-
the [traits chapter][traits] before this one, as well as the chapter on [trait
211+
the [traits][traits] section before this one, as well as the section on [trait
212212
objects][trait-objects].
213213

214214
[traits]: traits.html

src/doc/book/effective-rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
So you’ve learned how to write some Rust code. But there’s a difference between
44
writing *any* Rust code and writing *good* Rust code.
55

6-
This section consists of relatively independent tutorials which show you how to
6+
This chapter consists of relatively independent tutorials which show you how to
77
take your Rust to the next level. Common patterns and standard library features
88
will be introduced. Read these sections in any order of your choosing.

src/doc/book/error-handling.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ errors in a particular way. Generally speaking, error handling is divided into
55
two broad categories: exceptions and return values. Rust opts for return
66
values.
77

8-
In this chapter, we intend to provide a comprehensive treatment of how to deal
8+
In this section, we intend to provide a comprehensive treatment of how to deal
99
with errors in Rust. More than that, we will attempt to introduce error handling
1010
one piece at a time so that you'll come away with a solid working knowledge of
1111
how everything fits together.
1212

1313
When done naïvely, error handling in Rust can be verbose and annoying. This
14-
chapter will explore those stumbling blocks and demonstrate how to use the
14+
section will explore those stumbling blocks and demonstrate how to use the
1515
standard library to make error handling concise and ergonomic.
1616

1717
# Table of Contents
1818

19-
This chapter is very long, mostly because we start at the very beginning with
19+
This section is very long, mostly because we start at the very beginning with
2020
sum types and combinators, and try to motivate the way Rust does error handling
2121
incrementally. As such, programmers with experience in other expressive type
2222
systems may want to jump around.
@@ -636,7 +636,7 @@ Thus far, we've looked at error handling where everything was either an
636636
`Option` and a `Result`? Or what if you have a `Result<T, Error1>` and a
637637
`Result<T, Error2>`? Handling *composition of distinct error types* is the next
638638
challenge in front of us, and it will be the major theme throughout the rest of
639-
this chapter.
639+
this section.
640640

641641
## Composing `Option` and `Result`
642642

@@ -648,7 +648,7 @@ Of course, in real code, things aren't always as clean. Sometimes you have a
648648
mix of `Option` and `Result` types. Must we resort to explicit case analysis,
649649
or can we continue using combinators?
650650

651-
For now, let's revisit one of the first examples in this chapter:
651+
For now, let's revisit one of the first examples in this section:
652652

653653
```rust,should_panic
654654
use std::env;
@@ -1319,7 +1319,7 @@ and [`cause`](../std/error/trait.Error.html#method.cause), but the
13191319
limitation remains: `Box<Error>` is opaque. (N.B. This isn't entirely
13201320
true because Rust does have runtime reflection, which is useful in
13211321
some scenarios that are [beyond the scope of this
1322-
chapter](https://crates.io/crates/error).)
1322+
section](https://crates.io/crates/error).)
13231323

13241324
It's time to revisit our custom `CliError` type and tie everything together.
13251325

@@ -1486,7 +1486,7 @@ and [`fmt::Result`](../std/fmt/type.Result.html).
14861486

14871487
# Case study: A program to read population data
14881488

1489-
This chapter was long, and depending on your background, it might be
1489+
This section was long, and depending on your background, it might be
14901490
rather dense. While there is plenty of example code to go along with
14911491
the prose, most of it was specifically designed to be pedagogical. So,
14921492
we're going to do something new: a case study.
@@ -1512,7 +1512,7 @@ and [`rustc-serialize`](https://crates.io/crates/rustc-serialize) crates.
15121512

15131513
We're not going to spend a lot of time on setting up a project with
15141514
Cargo because it is already covered well in [the Cargo
1515-
chapter](../book/hello-cargo.html) and [Cargo's documentation][14].
1515+
section](../book/hello-cargo.html) and [Cargo's documentation][14].
15161516

15171517
To get started from scratch, run `cargo new --bin city-pop` and make sure your
15181518
`Cargo.toml` looks something like this:
@@ -2108,7 +2108,7 @@ handling.
21082108

21092109
# The Short Story
21102110

2111-
Since this chapter is long, it is useful to have a quick summary for error
2111+
Since this section is long, it is useful to have a quick summary for error
21122112
handling in Rust. These are some good “rules of thumb." They are emphatically
21132113
*not* commandments. There are probably good reasons to break every one of these
21142114
heuristics!

src/doc/book/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
% Getting Started
22

3-
This first section of the book will get us going with Rust and its tooling.
3+
This first chapter of the book will get us going with Rust and its tooling.
44
First, we’ll install Rust. Then, the classic ‘Hello World’ program. Finally,
55
we’ll talk about Cargo, Rust’s build system and package manager.
66

77
# Installing Rust
88

99
The first step to using Rust is to install it. Generally speaking, you’ll need
10-
an Internet connection to run the commands in this chapter, as we’ll be
10+
an Internet connection to run the commands in this section, as we’ll be
1111
downloading Rust from the internet.
1212

1313
We’ll be showing off a number of commands using a terminal, and those lines all

src/doc/book/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ prompt us to enter a guess. Upon entering our guess, it will tell us if we’re
77
too low or too high. Once we guess correctly, it will congratulate us. Sounds
88
good?
99

10-
Along the way, we’ll learn a little bit about Rust. The next section, ‘Syntax
10+
Along the way, we’ll learn a little bit about Rust. The next chapter, ‘Syntax
1111
and Semantics’, will dive deeper into each part.
1212

1313
# Set up

src/doc/book/learn-rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Learn Rust
22

3-
Welcome! This section has a few tutorials that teach you Rust through building
3+
Welcome! This chapter has a few tutorials that teach you Rust through building
44
projects. You’ll get a high-level overview, but we’ll skim over the details.
55

66
If you’d prefer a more ‘from the ground up’-style experience, check

src/doc/book/syntax-and-semantics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Syntax and Semantics
22

3-
This section breaks Rust down into small chunks, one for each concept.
3+
This chapter breaks Rust down into small chunks, one for each concept.
44

55
If you’d like to learn Rust from the bottom up, reading this in order is a
66
great way to do that.

0 commit comments

Comments
 (0)