geckodriver: Merge pull request #44 from andreastt/fix-rustc-1.6-warnings

Fix rustc 1.6 warnings

Source-Repo: https://github.com/mozilla/geckodriver
Source-Revision: 4a8a835d12e5c23a5080732867c96319c4885429

--HG--
extra : rebase_source : 5405f399e2e3d3597cc21546951c4e3a2d258134
This commit is contained in:
Andreas Tolfsen 2016-02-12 21:58:06 +00:00
Родитель 0aea9d14e3
Коммит 2adbf73afe
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -9,7 +9,8 @@ use std::error::Error;
use std::net::TcpStream;
use std::path::PathBuf;
use std::sync::Mutex;
use std::thread::sleep_ms;
use std::thread::sleep;
use std::time::Duration;
use hyper::method::Method;
use regex::Captures;
use mozrunner::runner::{Runner, FirefoxRunner};
@ -910,8 +911,8 @@ impl MarionetteConnection {
}
pub fn connect(&mut self) -> WebDriverResult<()> {
let timeout = 60 * 1000; // milliseconds
let poll_interval = 100; // milliseconds
let timeout = 60 * 1000; // ms
let poll_interval = 100; // ms
let poll_attempts = timeout / poll_interval;
let mut poll_attempt = 0;
loop {
@ -924,7 +925,7 @@ impl MarionetteConnection {
debug!("{}/{}", poll_attempt, poll_attempts);
if poll_attempt <= poll_attempts {
poll_attempt += 1;
sleep_ms(poll_interval);
sleep(Duration::from_millis(poll_interval));
} else {
return Err(WebDriverError::new(ErrorStatus::UnknownError,
e.description()));