Skip to content

Commit 2e21ff1

Browse files
committed
Rollup merge of #32218 - cantino:minor_book_typo_fixes, r=steveklabnik
Fix minor typos in doc.rust-lang.org/book I've made a few typo and grammar fixes as I've been working through the book.
2 parents d7f7ab9 + 56ab2a1 commit 2e21ff1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/doc/book/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ Cargo checks to see if any of your project’s files have been modified, and onl
501501
rebuilds your project if they’ve changed since the last time you built it.
502502

503503
With simple projects, Cargo doesn't bring a whole lot over just using `rustc`,
504-
but it will become useful in future. This is especially true when you start
504+
but it will become useful in the future. This is especially true when you start
505505
using crates; these are synonymous with a ‘library’ or ‘package’ in other
506506
programming languages. For complex projects composed of multiple crates, it’s
507507
much easier to let Cargo coordinate the build. Using Cargo, you can run `cargo

src/doc/book/if.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Rust’s take on `if` is not particularly complex, but it’s much more like the
44
`if` you’ll find in a dynamically typed language than in a more traditional
55
systems language. So let’s talk about it, to make sure you grasp the nuances.
66

7-
`if` is a specific form of a more general concept, the ‘branch’. The name comes
7+
`if` is a specific form of a more general concept, the ‘branch’, whose name comes
88
from a branch in a tree: a decision point, where depending on a choice,
99
multiple paths can be taken.
1010

src/doc/book/strings.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ let s = "foo\
4444
assert_eq!("foobar", s);
4545
```
4646

47-
Rust has more than only `&str`s though. A `String`, is a heap-allocated string.
47+
Rust has more than only `&str`s though. A `String` is a heap-allocated string.
4848
This string is growable, and is also guaranteed to be UTF-8. `String`s are
4949
commonly created by converting from a string slice using the `to_string`
5050
method.
@@ -89,7 +89,7 @@ Viewing a `String` as a `&str` is cheap, but converting the `&str` to a
8989

9090
## Indexing
9191

92-
Because strings are valid UTF-8, strings do not support indexing:
92+
Because strings are valid UTF-8, they do not support indexing:
9393

9494
```rust,ignore
9595
let s = "hello";

0 commit comments

Comments
 (0)