Skip to content

TRPL: minor fixes to the tutorials. #25402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/doc/trpl/dining-philosophers.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ a name is all we need. We choose the [`String`][string] type for the name,
rather than `&str`. Generally speaking, working with a type which owns its
data is easier than working with one that uses references.

[struct]: structs.html
[string]: strings.html

Let’s continue:

```rust
Expand Down Expand Up @@ -393,7 +396,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
}).collect();
```

While this is only five lines, they’re a dense four. Let’s break it down.
While this is only five lines, they’re a dense five. Let’s break it down.

```rust,ignore
let handles: Vec<_> =
Expand Down
12 changes: 6 additions & 6 deletions src/doc/trpl/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Check out the generated `Cargo.toml`:
[package]

name = "guessing_game"
version = "0.0.1"
version = "0.1.0"
authors = ["Your Name <you@example.com>"]
```

Expand All @@ -46,7 +46,7 @@ Let’s try compiling what Cargo gave us:

```{bash}
$ cargo build
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
```

Excellent! Open up your `src/main.rs` again. We’ll be writing all of
Expand All @@ -58,7 +58,7 @@ Try it out:

```bash
$ cargo run
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
Running `target/debug/guessing_game`
Hello, world!
```
Expand Down Expand Up @@ -727,7 +727,7 @@ Let’s try our program out!

```bash
$ cargo run
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
Running `target/guessing_game`
Guess the number!
The secret number is: 58
Expand Down Expand Up @@ -792,7 +792,7 @@ and quit. Observe:

```bash
$ cargo run
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
Running `target/guessing_game`
Guess the number!
The secret number is: 59
Expand Down Expand Up @@ -929,7 +929,7 @@ Now we should be good! Let’s try:

```bash
$ cargo run
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
Running `target/guessing_game`
Guess the number!
The secret number is: 61
Expand Down