Remove empty argument lists from do expressions

This commit is contained in:
Ben Striegel
2012-07-04 15:04:28 -04:00
committed by Brian Anderson
parent 718849b202
commit f2e2a14f36
62 changed files with 265 additions and 265 deletions

View File

@@ -1638,7 +1638,7 @@ task in a _failing state_.
~~~~
# let buildr = task::builder();
# task::unsupervise(buildr);
# do task::run(buildr) || {
# do task::run(buildr) {
(~[1, 2, 3, 4])[0];
(~[mut 'x', 'y'])[1] = 'z';
@@ -3365,7 +3365,7 @@ An example of a `spawn` call:
let po = comm::port();
let ch = comm::chan(po);
do task::spawn || {
do task::spawn {
// let task run, do other things
// ...
comm::send(ch, true);

View File

@@ -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);
}