Skip to content

Commit f2e2a14

Browse files
bstriebrson
authored andcommittedJul 5, 2012
Remove empty argument lists from do expressions
1 parent 718849b commit f2e2a14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+265
-265
lines changed
 

‎doc/rust.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ task in a _failing state_.
16381638
~~~~
16391639
# let buildr = task::builder();
16401640
# task::unsupervise(buildr);
1641-
# do task::run(buildr) || {
1641+
# do task::run(buildr) {
16421642
16431643
(~[1, 2, 3, 4])[0];
16441644
(~[mut 'x', 'y'])[1] = 'z';
@@ -3365,7 +3365,7 @@ An example of a `spawn` call:
33653365
let po = comm::port();
33663366
let ch = comm::chan(po);
33673367
3368-
do task::spawn || {
3368+
do task::spawn {
33693369
// let task run, do other things
33703370
// ...
33713371
comm::send(ch, true);

‎doc/tutorial.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2473,7 +2473,7 @@ module `task`. Let's begin with the simplest one, `task::spawn()`:
24732473
24742474
~~~~
24752475
let some_value = 22;
2476-
do task::spawn || {
2476+
do task::spawn {
24772477
io::println("This executes in the child task.");
24782478
io::println(#fmt("%d", some_value));
24792479
}
@@ -2499,7 +2499,7 @@ in parallel. We might write something like:
24992499
# fn some_other_expensive_computation() {}
25002500
let port = comm::port::<int>();
25012501
let chan = comm::chan::<int>(port);
2502-
do task::spawn || {
2502+
do task::spawn {
25032503
let result = some_expensive_computation();
25042504
comm::send(chan, result);
25052505
}
@@ -2530,7 +2530,7 @@ The next statement actually spawns the child:
25302530
# fn some_expensive_computation() -> int { 42 }
25312531
# let port = comm::port::<int>();
25322532
# let chan = comm::chan::<int>(port);
2533-
do task::spawn || {
2533+
do task::spawn {
25342534
let result = some_expensive_computation();
25352535
comm::send(chan, result);
25362536
}

0 commit comments

Comments
 (0)
Please sign in to comment.