diff --git a/src/librustuv/addrinfo.rs b/src/librustuv/addrinfo.rs index 94a084fe055a..4766630b0f42 100644 --- a/src/librustuv/addrinfo.rs +++ b/src/librustuv/addrinfo.rs @@ -33,7 +33,7 @@ pub struct GetAddrInfoRequest; impl GetAddrInfoRequest { pub fn run(loop_: &Loop, node: Option<&str>, service: Option<&str>, - hints: Option) -> Result<~[ai::Info], UvError> { + hints: Option) -> Result, UvError> { assert!(node.is_some() || service.is_some()); let (_c_node, c_node_ptr) = match node { Some(n) => { @@ -134,7 +134,7 @@ fn each_ai_flag(_f: |c_int, ai::Flag|) { } // Traverse the addrinfo linked list, producing a vector of Rust socket addresses -pub fn accum_addrinfo(addr: &Addrinfo) -> ~[ai::Info] { +pub fn accum_addrinfo(addr: &Addrinfo) -> Vec { unsafe { let mut addr = addr.handle; @@ -180,6 +180,6 @@ pub fn accum_addrinfo(addr: &Addrinfo) -> ~[ai::Info] { } } - return addrs.move_iter().collect(); + addrs } } diff --git a/src/librustuv/process.rs b/src/librustuv/process.rs index d744607050fc..d671e20868c5 100644 --- a/src/librustuv/process.rs +++ b/src/librustuv/process.rs @@ -40,7 +40,8 @@ impl Process { /// Returns either the corresponding process object or an error which /// occurred. pub fn spawn(io_loop: &mut UvIoFactory, config: process::ProcessConfig) - -> Result<(Box, ~[Option]), UvError> { + -> Result<(Box, Vec>), UvError> + { let cwd = config.cwd.map(|s| s.to_c_str()); let mut io = vec![config.stdin, config.stdout, config.stderr]; for slot in config.extra_io.iter() { @@ -102,7 +103,7 @@ impl Process { }); match ret { - Ok(p) => Ok((p, ret_io.move_iter().collect())), + Ok(p) => Ok((p, ret_io)), Err(e) => Err(e), } } diff --git a/src/librustuv/uvio.rs b/src/librustuv/uvio.rs index 17a64fdb5176..50258c2583c6 100644 --- a/src/librustuv/uvio.rs +++ b/src/librustuv/uvio.rs @@ -178,7 +178,7 @@ impl IoFactory for UvIoFactory { } fn get_host_addresses(&mut self, host: Option<&str>, servname: Option<&str>, - hint: Option) -> Result<~[ai::Info], IoError> { + hint: Option) -> Result, IoError> { let r = GetAddrInfoRequest::run(&self.loop_, host, servname, hint); r.map_err(uv_error_to_io_error) } @@ -272,7 +272,7 @@ impl IoFactory for UvIoFactory { fn spawn(&mut self, config: ProcessConfig) -> Result<(Box, - ~[Option>]), + Vec>>), IoError> { match Process::spawn(self, config) {