Update futures and tokio alphas
This commit is contained in:
		| @@ -9,7 +9,7 @@ h2 = { path = "../..", features = ["stream", "unstable"] } | ||||
|  | ||||
| bytes = "0.4.7" | ||||
| env_logger = "0.5.9" | ||||
| futures-preview = "0.3.0-alpha.17" | ||||
| futures-preview = "=0.3.0-alpha.18" | ||||
| http = "0.1.5" | ||||
| string = "0.2" | ||||
| tokio = "0.2.0-alpha.1" | ||||
| tokio = "=0.2.0-alpha.4" | ||||
|   | ||||
| @@ -7,14 +7,13 @@ use futures::future::poll_fn; | ||||
| use futures::{ready, Stream, StreamExt}; | ||||
|  | ||||
| use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}; | ||||
| use tokio::timer::Delay; | ||||
|  | ||||
| use super::assert::assert_frame_eq; | ||||
| use futures::executor::block_on; | ||||
| use std::pin::Pin; | ||||
| use std::sync::{Arc, Mutex}; | ||||
| use std::task::{Context, Poll, Waker}; | ||||
| use std::time::{Duration, Instant}; | ||||
| use std::time::Duration; | ||||
| use std::{cmp, io, usize}; | ||||
|  | ||||
| /// A mock I/O | ||||
| @@ -483,5 +482,5 @@ impl AsyncWrite for Pipe { | ||||
| } | ||||
|  | ||||
| pub async fn idle_ms(ms: u64) { | ||||
|     Delay::new(Instant::now() + Duration::from_millis(ms)).await | ||||
|     tokio::timer::delay(tokio::clock::now() + Duration::from_millis(ms)).await | ||||
| } | ||||
|   | ||||
| @@ -396,7 +396,7 @@ mod tokio_ { | ||||
|                 match self.inner.read(buf) { | ||||
|                     Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => { | ||||
|                         if let Some(rem) = self.inner.remaining_wait() { | ||||
|                             self.tokio.sleep = Some(Delay::new(Instant::now() + rem)); | ||||
|                             self.tokio.sleep = Some(tokio::timer::delay(Instant::now() + rem)); | ||||
|                         } else { | ||||
|                             self.tokio.read_wait = Some(cx.waker().clone()); | ||||
|                             return Poll::Pending; | ||||
| @@ -440,7 +440,7 @@ mod tokio_ { | ||||
|                 match self.inner.write(buf) { | ||||
|                     Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => { | ||||
|                         if let Some(rem) = self.inner.remaining_wait() { | ||||
|                             self.tokio.sleep = Some(Delay::new(Instant::now() + rem)); | ||||
|                             self.tokio.sleep = Some(tokio::timer::delay(Instant::now() + rem)); | ||||
|                         } else { | ||||
|                             panic!("unexpected WouldBlock"); | ||||
|                         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user