File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ use core::result;
2626use core:: run;
2727use core:: str;
2828use core:: task;
29+ use core:: pipes:: * ;
2930use std:: future;
3031use syntax;
3132
@@ -168,12 +169,8 @@ fn readclose(fd: libc::c_int) -> ~str {
168169}
169170
170171fn 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
You can’t perform that action at this time.
0 commit comments