Fix some simple compile-time warnings (#297)
This commit is contained in:
parent
03ec4aafa8
commit
67a11f27ff
|
@ -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"
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue