Fix minor typos in doc.rust-lang.org/book

This commit is contained in:
Andrew Cantino 2016-03-12 12:35:34 -08:00
parent 0f62d219fb
commit 56ab2a1cde
3 changed files with 4 additions and 4 deletions

View File

@ -513,7 +513,7 @@ Cargo checks to see if any of your projects files have been modified, and onl
rebuilds your project if theyve changed since the last time you built it.
With simple projects, Cargo doesn't bring a whole lot over just using `rustc`,
but it will become useful in future. This is especially true when you start
but it will become useful in the future. This is especially true when you start
using crates; these are synonymous with a library or package in other
programming languages. For complex projects composed of multiple crates, its
much easier to let Cargo coordinate the build. Using Cargo, you can run `cargo

View File

@ -4,7 +4,7 @@ Rusts take on `if` is not particularly complex, but its much more like the
`if` youll find in a dynamically typed language than in a more traditional
systems language. So lets talk about it, to make sure you grasp the nuances.
`if` is a specific form of a more general concept, the branch. The name comes
`if` is a specific form of a more general concept, the branch, whose name comes
from a branch in a tree: a decision point, where depending on a choice,
multiple paths can be taken.

View File

@ -44,7 +44,7 @@ let s = "foo\
assert_eq!("foobar", s);
```
Rust has more than only `&str`s though. A `String`, is a heap-allocated string.
Rust has more than only `&str`s though. A `String` is a heap-allocated string.
This string is growable, and is also guaranteed to be UTF-8. `String`s are
commonly created by converting from a string slice using the `to_string`
method.
@ -89,7 +89,7 @@ Viewing a `String` as a `&str` is cheap, but converting the `&str` to a
## Indexing
Because strings are valid UTF-8, strings do not support indexing:
Because strings are valid UTF-8, they do not support indexing:
```rust,ignore
let s = "hello";