diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2012-07-04 15:04:28 -0400 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-07-04 17:21:29 -0700 |
| commit | f2e2a14f364041fc5cb346fd308bb1777ca3c24c (patch) | |
| tree | 05aef0c2982c1acdb73054442b788092c4ceb2b8 /doc/tutorial.md | |
| parent | 718849b202aa6655a7d493a0eaf7f119136e2505 (diff) | |
| download | rust-f2e2a14f364041fc5cb346fd308bb1777ca3c24c.tar.gz rust-f2e2a14f364041fc5cb346fd308bb1777ca3c24c.zip | |
Remove empty argument lists from do expressions
Diffstat (limited to 'doc/tutorial.md')
| -rw-r--r-- | doc/tutorial.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index 03e4da4d70a..306a39f7550 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -2473,7 +2473,7 @@ module `task`. Let's begin with the simplest one, `task::spawn()`: ~~~~ let some_value = 22; -do task::spawn || { +do task::spawn { io::println("This executes in the child task."); io::println(#fmt("%d", some_value)); } @@ -2499,7 +2499,7 @@ in parallel. We might write something like: # fn some_other_expensive_computation() {} let port = comm::port::<int>(); let chan = comm::chan::<int>(port); -do task::spawn || { +do task::spawn { let result = some_expensive_computation(); comm::send(chan, result); } @@ -2530,7 +2530,7 @@ The next statement actually spawns the child: # fn some_expensive_computation() -> int { 42 } # let port = comm::port::<int>(); # let chan = comm::chan::<int>(port); -do task::spawn || { +do task::spawn { let result = some_expensive_computation(); comm::send(chan, result); } |
