Skip to content
Permalink
Browse files

Delete trailing whitespace in dining philosophers example

  • Loading branch information...
lambda committed May 20, 2015
1 parent 007eb95 commit 6170a4fc4c00e6b41d103a341b3afa1258f1271f
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/doc/trpl/dining-philosophers.md
@@ -144,15 +144,15 @@ look at `main()` again:
# struct Philosopher {
# name: String,
# }
#
#
# impl Philosopher {
# fn new(name: &str) -> Philosopher {
# Philosopher {
# name: name.to_string(),
# }
# }
# }
#
#
fn main() {
let p1 = Philosopher::new("Plato");
let p2 = Philosopher::new("Hypatia");
@@ -190,15 +190,15 @@ a method, and then loop through all the philosophers, calling it:
```rust
struct Philosopher {
name: String,
}
}
impl Philosopher {
impl Philosopher {
fn new(name: &str) -> Philosopher {
Philosopher {
name: name.to_string(),
}
}
fn eat(&self) {
println!("{} is done eating.", self.name);
}
@@ -260,15 +260,15 @@ use std::thread;
struct Philosopher {
name: String,
}
}
impl Philosopher {
impl Philosopher {
fn new(name: &str) -> Philosopher {
Philosopher {
name: name.to_string(),
}
}
fn eat(&self) {
println!("{} is eating.", self.name);
@@ -341,9 +341,9 @@ use std::thread;
struct Philosopher {
name: String,
}
}
impl Philosopher {
impl Philosopher {
fn new(name: &str) -> Philosopher {
Philosopher {
name: name.to_string(),
@@ -394,7 +394,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
While this is only five lines, they’re a dense five. Let’s break it down.

```rust,ignore
let handles: Vec<_> =
let handles: Vec<_> =
```

We introduce a new binding, called `handles`. We’ve given it this name because

0 comments on commit 6170a4f

Please sign in to comment.
You can’t perform that action at this time.