Fix some simple compile-time warnings (#297)

This commit is contained in:
Jon Gjengset 2019-07-05 17:10:11 -04:00 committed by GitHub
parent 03ec4aafa8
commit 67a11f27ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 5 deletions

View File

@ -37,7 +37,7 @@ tower-util = "0.1.0"
[dev-dependencies]
log = "0.4.1"
env_logger = { version = "0.5.3", default-features = false }
hdrsample = "6.0"
hdrhistogram = "6.0"
quickcheck = { version = "0.6", default-features = false }
tokio = "0.1.7"
tokio-executor = "0.1.2"

View File

@ -2,7 +2,7 @@
use env_logger;
use futures::{future, stream, Async, Future, Poll, Stream};
use hdrsample::Histogram;
use hdrhistogram::Histogram;
use rand::{self, Rng};
use std::time::{Duration, Instant};
use tokio::{runtime, timer};

View File

@ -49,6 +49,6 @@ fn new_service() -> (LoadShed<Mock>, Handle) {
}
fn with_task<F: FnOnce() -> U, U>(f: F) -> U {
use futures::future::{lazy, Future};
use futures::future::lazy;
lazy(|| Ok::<_, ()>(f())).wait().unwrap()
}

View File

@ -163,7 +163,6 @@ fn assert_not_ready<F: Future>(f: &mut F)
where
F::Error: ::std::fmt::Debug,
{
use futures::future;
future::poll_fn(|| {
assert!(f.poll().unwrap().is_not_ready());
Ok::<_, ()>(().into())

View File

@ -54,6 +54,6 @@ fn new_mock() -> (Mock, Handle) {
// Helper to run some code within context of a task
fn with_task<F: FnOnce() -> U, U>(f: F) -> U {
use futures::future::{lazy, Future};
use futures::future::lazy;
lazy(|| Ok::<_, ()>(f())).wait().unwrap()
}