about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2014-08-20 01:34:41 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2014-08-20 01:34:41 +0200
commit17c630a8dd4d8fbbf7e2fd454593c6529dcc93ab (patch)
tree501a55e0d075e549644fd6c2be08bad302dbeca8 /src
parent51b901e16048c5adbe1f12428fe5a79603478f83 (diff)
downloadrust-17c630a8dd4d8fbbf7e2fd454593c6529dcc93ab.tar.gz
rust-17c630a8dd4d8fbbf7e2fd454593c6529dcc93ab.zip
doc: small tasks guide improvements
Diffstat (limited to 'src')
-rw-r--r--src/doc/guide-tasks.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/doc/guide-tasks.md b/src/doc/guide-tasks.md
index 6ef273e7a1a..757fc034831 100644
--- a/src/doc/guide-tasks.md
+++ b/src/doc/guide-tasks.md
@@ -89,10 +89,9 @@ closure in the new task.
 fn print_message() { println!("I am running in a different task!"); }
 spawn(print_message);
 
-// Print something profound in a different task using a `proc` expression
+// Alternatively, use a `proc` expression instead of a named function.
 // The `proc` expression evaluates to an (unnamed) owned closure.
 // That closure will call `println!(...)` when the spawned task runs.
-
 spawn(proc() println!("I am also running in a different task!") );
 ~~~~
 
@@ -352,14 +351,14 @@ fn main() {
 
 The function `pnorm` performs a simple computation on the vector (it computes the sum of its items
 at the power given as argument and takes the inverse power of this value). The Arc on the vector is
-created by the line
+created by the line:
 
 ~~~
 # use std::rand;
 # use std::sync::Arc;
 # fn main() {
 # let numbers = Vec::from_fn(1000000, |_| rand::random::<f64>());
-let numbers_arc=Arc::new(numbers);
+let numbers_arc = Arc::new(numbers);
 # }
 ~~~