std: Fix build errors

This commit is contained in:
Brian Anderson 2014-08-07 16:00:22 -07:00
parent 500b600362
commit 31281b4bd1
3 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ impl TcpStream {
pub fn connect_timeout(addr: SocketAddr,
timeout: Duration) -> IoResult<TcpStream> {
if timeout <= Duration::milliseconds(0) {
return standard_error(TimedOut);
return Err(standard_error(TimedOut));
}
let SocketAddr { ip, port } = addr;

View File

@ -75,7 +75,7 @@ impl UnixStream {
pub fn connect_timeout<P: ToCStr>(path: &P,
timeout: Duration) -> IoResult<UnixStream> {
if timeout <= Duration::milliseconds(0) {
return standard_error(TimedOut);
return Err(standard_error(TimedOut));
}
LocalIo::maybe_raise(|io| {

View File

@ -16,7 +16,7 @@ use {fmt, i32};
use ops::{Add, Sub, Mul, Div, Neg};
use option::{Option, Some, None};
use num;
use num::{CheckedAdd, CheckedMul, ToPrimitive};
use num::{CheckedAdd, CheckedMul};
use result::{Result, Ok, Err};