Skip to content

Commit

Permalink
std: Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Aug 13, 2014
1 parent 500b600 commit 31281b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libstd/io/net/tcp.rs
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/net/unix.rs
Expand Up @@ -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| {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/time/duration.rs
Expand Up @@ -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};


Expand Down

0 comments on commit 31281b4

Please sign in to comment.