impl GetAddrInfoRequest {
pub fn run(host: Option<&str>, servname: Option<&str>,
- hint: Option<ai::Hint>) -> Result<~[ai::Info], IoError> {
+ hint: Option<ai::Hint>) -> Result<Vec<ai::Info>, IoError> {
assert!(host.is_some() || servname.is_some());
let c_host = host.map_or(unsafe { CString::new(null(), true) }, |x| x.to_c_str());
unsafe { freeaddrinfo(res); }
- Ok(addrs.move_iter().collect())
+ Ok(addrs)
}
}
})
}
fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>,
- hint: Option<ai::Hint>) -> IoResult<~[ai::Info]> {
+ hint: Option<ai::Hint>) -> IoResult<Vec<ai::Info>> {
addrinfo::GetAddrInfoRequest::run(host, servname, hint)
}
}
fn spawn(&mut self, config: ProcessConfig)
-> IoResult<(Box<RtioProcess:Send>,
- ~[Option<Box<RtioPipe:Send>>])> {
+ Vec<Option<Box<RtioPipe:Send>>>)> {
process::Process::spawn(config).map(|(p, io)| {
(box p as Box<RtioProcess:Send>,
io.move_iter().map(|p| p.map(|p| {
/// os pipe instead. This process takes ownership of these file
/// descriptors, closing them upon destruction of the process.
pub fn spawn(config: p::ProcessConfig)
- -> Result<(Process, ~[Option<file::FileDesc>]), io::IoError>
+ -> Result<(Process, Vec<Option<file::FileDesc>>), io::IoError>
{
// right now we only handle stdin/stdout/stderr.
if config.extra_io.len() > 0 {
exit_code: None,
exit_signal: None,
},
- ret_io.move_iter().collect()))
+ ret_io))
}
Err(e) => Err(e)
}
fn timer_init(&mut self) -> IoResult<Box<RtioTimer:Send>>;
fn spawn(&mut self, config: ProcessConfig)
-> IoResult<(Box<RtioProcess:Send>,
- ~[Option<Box<RtioPipe:Send>>])>;
+ Vec<Option<Box<RtioPipe:Send>>>)>;
fn kill(&mut self, pid: libc::pid_t, signal: int) -> IoResult<()>;
fn pipe_open(&mut self, fd: c_int) -> IoResult<Box<RtioPipe:Send>>;
fn tty_open(&mut self, fd: c_int, readable: bool)