File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,11 @@ iotest!(fn timeout_error() {
99
99
100
100
iotest ! ( fn connect_timeout_zero( ) {
101
101
let addr = next_test_ip4( ) ;
102
- assert!( TcpStream :: connect_timeout( & addr, Duration :: milliseconds( 0 ) ) . is_err( ) ) ;
102
+ assert!( TcpStream :: connect_timeout( addr, Duration :: milliseconds( 0 ) ) . is_err( ) ) ;
103
103
} )
104
104
105
105
iotest ! ( fn connect_timeout_negative( ) {
106
106
let addr = next_test_ip4( ) ;
107
- assert!( TcpStream :: connect_timeout( & addr, Duration :: milliseconds( -1 ) ) . is_err( ) ) ;
107
+ assert!( TcpStream :: connect_timeout( addr, Duration :: milliseconds( -1 ) ) . is_err( ) ) ;
108
108
} )
109
109
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ extern crate debug;
23
23
use std:: io:: net:: tcp:: { TcpListener , TcpStream } ;
24
24
use std:: io:: { Acceptor , Listener } ;
25
25
use std:: task:: TaskBuilder ;
26
+ use std:: time:: Duration ;
26
27
27
28
#[ start]
28
29
fn start ( argc : int , argv : * const * const u8 ) -> int {
@@ -33,7 +34,7 @@ fn main() {
33
34
// This test has a chance to time out, try to not let it time out
34
35
spawn ( proc ( ) {
35
36
use std:: io:: timer;
36
- timer:: sleep ( 30 * 1000 ) ;
37
+ timer:: sleep ( Duration :: milliseconds ( 30 * 1000 ) ) ;
37
38
println ! ( "timed out!" ) ;
38
39
unsafe { libc:: exit ( 1 ) }
39
40
} ) ;
You can’t perform that action at this time.
0 commit comments