change: split futures crate

This commit is contained in:
quininer 2018-04-14 18:17:04 +08:00
parent 1323596dd2
commit be00ca6168
2 changed files with 13 additions and 6 deletions

View File

@ -15,14 +15,20 @@ travis-ci = { repository = "quininer/tokio-rustls" }
appveyor = { repository = "quininer/tokio-rustls" } appveyor = { repository = "quininer/tokio-rustls" }
[dependencies] [dependencies]
futures = { version = "0.2.0", optional = true } futures-core = { version = "0.2.0", optional = true }
futures-io = { version = "0.2.0", optional = true }
tokio = { version = "0.1.5", optional = true } tokio = { version = "0.1.5", optional = true }
rustls = "0.12" rustls = "0.12"
webpki = "0.18.0-alpha" webpki = "0.18.0-alpha"
[dev-dependencies] [dev-dependencies]
futures = "0.2.0"
tokio = "0.1.5" tokio = "0.1.5"
[features] [features]
default = [ "tokio" ] default = [ "tokio" ]
unstable-futures = [ "futures", "tokio/unstable-futures" ] unstable-futures = [
"futures-core",
"futures-io",
"tokio/unstable-futures"
]

View File

@ -1,9 +1,10 @@
extern crate futures; extern crate futures_core;
extern crate futures_io;
use super::*; use super::*;
use self::futures::{ Future, Poll, Async }; use self::futures_core::{ Future, Poll, Async };
use self::futures::io::{ Error, AsyncRead, AsyncWrite }; use self::futures_core::task::Context;
use self::futures::task::Context; use self::futures_io::{ Error, AsyncRead, AsyncWrite };
impl<S: AsyncRead + AsyncWrite> Future for ConnectAsync<S> { impl<S: AsyncRead + AsyncWrite> Future for ConnectAsync<S> {