Skip to content

Commit 0db2ae6

Browse files
committed
Delete trailing whitespace in dining philosophers example
1 parent 7f6deda commit 0db2ae6

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/doc/trpl/dining-philosophers.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ look at `main()` again:
144144
# struct Philosopher {
145145
# name: String,
146146
# }
147-
#
147+
#
148148
# impl Philosopher {
149149
# fn new(name: &str) -> Philosopher {
150150
# Philosopher {
151151
# name: name.to_string(),
152152
# }
153153
# }
154154
# }
155-
#
155+
#
156156
fn main() {
157157
let p1 = Philosopher::new("Plato");
158158
let p2 = Philosopher::new("Hypatia");
@@ -190,15 +190,15 @@ a method, and then loop through all the philosophers, calling it:
190190
```rust
191191
struct Philosopher {
192192
name: String,
193-
}
193+
}
194194

195-
impl Philosopher {
195+
impl Philosopher {
196196
fn new(name: &str) -> Philosopher {
197197
Philosopher {
198198
name: name.to_string(),
199199
}
200200
}
201-
201+
202202
fn eat(&self) {
203203
println!("{} is done eating.", self.name);
204204
}
@@ -260,15 +260,15 @@ use std::thread;
260260

261261
struct Philosopher {
262262
name: String,
263-
}
263+
}
264264

265-
impl Philosopher {
265+
impl Philosopher {
266266
fn new(name: &str) -> Philosopher {
267267
Philosopher {
268268
name: name.to_string(),
269269
}
270270
}
271-
271+
272272
fn eat(&self) {
273273
println!("{} is eating.", self.name);
274274

@@ -341,9 +341,9 @@ use std::thread;
341341

342342
struct Philosopher {
343343
name: String,
344-
}
344+
}
345345

346-
impl Philosopher {
346+
impl Philosopher {
347347
fn new(name: &str) -> Philosopher {
348348
Philosopher {
349349
name: name.to_string(),
@@ -394,7 +394,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
394394
While this is only five lines, they’re a dense five. Let’s break it down.
395395

396396
```rust,ignore
397-
let handles: Vec<_> =
397+
let handles: Vec<_> =
398398
```
399399

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

0 commit comments

Comments
 (0)