std: Fix build errors
This commit is contained in:
parent
500b600362
commit
31281b4bd1
@ -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;
|
||||
|
@ -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| {
|
||||
|
@ -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};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user