File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 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() {
9999
100100 iotest ! ( fn connect_timeout_zero( ) {
101101 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( ) ) ;
103103 } )
104104
105105 iotest ! ( fn connect_timeout_negative( ) {
106106 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( ) ) ;
108108 } )
109109
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ extern crate debug;
2323use std:: io:: net:: tcp:: { TcpListener , TcpStream } ;
2424use std:: io:: { Acceptor , Listener } ;
2525use std:: task:: TaskBuilder ;
26+ use std:: time:: Duration ;
2627
2728#[ start]
2829fn start ( argc : int , argv : * const * const u8 ) -> int {
@@ -33,7 +34,7 @@ fn main() {
3334 // This test has a chance to time out, try to not let it time out
3435 spawn ( proc ( ) {
3536 use std:: io:: timer;
36- timer:: sleep ( 30 * 1000 ) ;
37+ timer:: sleep ( Duration :: milliseconds ( 30 * 1000 ) ) ;
3738 println ! ( "timed out!" ) ;
3839 unsafe { libc:: exit ( 1 ) }
3940 } ) ;
You can’t perform that action at this time.
0 commit comments