File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 16
16
* let po = comm::port();
17
17
* let ch = comm::chan(po);
18
18
*
19
- * task::spawn {||
19
+ * do task::spawn {
20
20
* comm::send(ch, "Hello, World");
21
- * });
21
+ * }
22
22
*
23
23
* io::println(comm::recv(p));
24
24
* ~~~
Original file line number Diff line number Diff line change 17
17
* # Example
18
18
*
19
19
* ~~~
20
- * spawn {||
20
+ * do spawn {
21
21
* log(error, "Hello, World!");
22
22
* }
23
23
* ~~~
@@ -434,7 +434,7 @@ fn spawn_listener<A:send>(+f: fn~(comm::port<A>)) -> comm::chan<A> {
434
434
*
435
435
* let po = comm::port();
436
436
* let ch = comm::chan(po);
437
- * let ch = spawn_listener { |po|
437
+ * let ch = do spawn_listener |po| {
438
438
* // Now the child has a port called 'po' to read from and
439
439
* // an environment-captured channel called 'ch'.
440
440
* };
@@ -529,7 +529,7 @@ fn get_task() -> task {
529
529
* # Example
530
530
*
531
531
* ~~~
532
- * task::unkillable {||
532
+ * do task::unkillable {
533
533
* // detach / yield / destroy must all be called together
534
534
* rustrt::rust_port_detach(po);
535
535
* // This must not result in the current task being killed
You can’t perform that action at this time.
0 commit comments