Skip to content

Commit 2e8ebb7

Browse files
committed
stdlib: Update the example in std::comm
Due to a bug in channel destructors this examples fails when logging is off Issue #1155
1 parent 12f2b49 commit 2e8ebb7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/comm.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ shared boxes (@T) may not be transmitted across channels.
1515
1616
Example:
1717
18-
> use std::task;
19-
> use std::comm;
18+
> use std::{task, comm, io};
2019
>
2120
> let p = comm::port();
2221
> task::spawn(comm::chan(p), fn (c: chan<str>) {
2322
> comm::send(c, "Hello, World");
2423
> });
2524
>
26-
> log comm::recv(p);
25+
> io::println(comm::recv(p));
2726
2827
*/
2928

0 commit comments

Comments
 (0)