From b032c40c331f33526cff74fbd7797dc286e0caf0 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Wed, 20 May 2015 01:43:09 -0400 Subject: [PATCH] Delete trailing whitespace in dining philosophers example --- src/doc/trpl/dining-philosophers.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/doc/trpl/dining-philosophers.md b/src/doc/trpl/dining-philosophers.md index 16699a0c906d5..b65760e34d430 100644 --- a/src/doc/trpl/dining-philosophers.md +++ b/src/doc/trpl/dining-philosophers.md @@ -144,7 +144,7 @@ look at `main()` again: # struct Philosopher { # name: String, # } -# +# # impl Philosopher { # fn new(name: &str) -> Philosopher { # Philosopher { @@ -152,7 +152,7 @@ look at `main()` again: # } # } # } -# +# 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