Skip to content

Commit b80d711

Browse files
committed
rustdoc: Remove another use of oldcomm
1 parent 65f711a commit b80d711

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/librustdoc/markdown_writer.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use core::result;
2626
use core::run;
2727
use core::str;
2828
use core::task;
29+
use core::pipes::*;
2930
use std::future;
3031
use syntax;
3132

@@ -168,12 +169,8 @@ fn readclose(fd: libc::c_int) -> ~str {
168169
}
169170
170171
fn generic_writer(process: fn~(markdown: ~str)) -> Writer {
171-
let (setup_po, setup_ch) = pipes::stream();
172+
let (po, ch) = stream::<WriteInstr>();
172173
do task::spawn |move process, move setup_ch| {
173-
let po: oldcomm::Port<WriteInstr> = oldcomm::Port();
174-
let ch = oldcomm::Chan(&po);
175-
setup_ch.send(ch);
176-
177174
let mut markdown = ~"";
178175
let mut keep_going = true;
179176
while keep_going {
@@ -184,10 +181,8 @@ fn generic_writer(process: fn~(markdown: ~str)) -> Writer {
184181
}
185182
process(move markdown);
186183
};
187-
let ch = setup_po.recv();
188-
189184
fn~(instr: WriteInstr) {
190-
oldcomm::send(ch, instr);
185+
ch.send(instr);
191186
}
192187
}
193188

0 commit comments

Comments
 (0)