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;
26
26
use core:: run;
27
27
use core:: str;
28
28
use core:: task;
29
+ use core:: pipes:: * ;
29
30
use std:: future;
30
31
use syntax;
31
32
@@ -168,12 +169,8 @@ fn readclose(fd: libc::c_int) -> ~str {
168
169
}
169
170
170
171
fn generic_writer(process: fn~(markdown: ~str)) -> Writer {
171
- let (setup_po, setup_ch ) = pipes::stream ();
172
+ let (po, ch ) = stream::<WriteInstr> ();
172
173
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
-
177
174
let mut markdown = ~" ";
178
175
let mut keep_going = true;
179
176
while keep_going {
@@ -184,10 +181,8 @@ fn generic_writer(process: fn~(markdown: ~str)) -> Writer {
184
181
}
185
182
process(move markdown);
186
183
};
187
- let ch = setup_po.recv();
188
-
189
184
fn~(instr: WriteInstr) {
190
- oldcomm:: send(ch, instr);
185
+ ch. send(instr);
191
186
}
192
187
}
193
188
You can’t perform that action at this time.
0 commit comments