From be00ca61687cea34e649410e170b211b8d8cea15 Mon Sep 17 00:00:00 2001 From: quininer Date: Sat, 14 Apr 2018 18:17:04 +0800 Subject: [PATCH] change: split futures crate --- Cargo.toml | 10 ++++++++-- src/futures_impl.rs | 9 +++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6356094..16ed9f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,14 +15,20 @@ travis-ci = { repository = "quininer/tokio-rustls" } appveyor = { repository = "quininer/tokio-rustls" } [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 } rustls = "0.12" webpki = "0.18.0-alpha" [dev-dependencies] +futures = "0.2.0" tokio = "0.1.5" [features] default = [ "tokio" ] -unstable-futures = [ "futures", "tokio/unstable-futures" ] +unstable-futures = [ + "futures-core", + "futures-io", + "tokio/unstable-futures" +] diff --git a/src/futures_impl.rs b/src/futures_impl.rs index 13d3c35..6771316 100644 --- a/src/futures_impl.rs +++ b/src/futures_impl.rs @@ -1,9 +1,10 @@ -extern crate futures; +extern crate futures_core; +extern crate futures_io; use super::*; -use self::futures::{ Future, Poll, Async }; -use self::futures::io::{ Error, AsyncRead, AsyncWrite }; -use self::futures::task::Context; +use self::futures_core::{ Future, Poll, Async }; +use self::futures_core::task::Context; +use self::futures_io::{ Error, AsyncRead, AsyncWrite }; impl Future for ConnectAsync {