Stop using deprecated method

This commit is contained in:
Steven Fackler 2016-02-08 23:12:54 -08:00
parent c33e2fede0
commit e3e4aa4472
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ use std::net::{TcpStream, TcpListener, SocketAddr};
use std::path::Path;
use std::process::{Command, Child, Stdio, ChildStdin};
use std::thread;
use std::time::Duration;
use net2::TcpStreamExt;
@ -79,7 +80,7 @@ impl Server {
match TcpStream::connect(&addr) {
Ok(s) => return (server, s),
Err(ref e) if e.kind() == io::ErrorKind::ConnectionRefused => {
thread::sleep_ms(100);
thread::sleep(Duration::from_millis(100));
}
Err(e) => panic!("wut: {}", e),
}