From f24d8bfd685a9b1e25ffcb644b16f7c04708ccd6 Mon Sep 17 00:00:00 2001 From: tinaun Date: Wed, 25 Jul 2018 22:30:16 -0400 Subject: [PATCH] add `Compat` to main lib --- futures/Cargo.toml | 1 + futures/src/lib.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/futures/Cargo.toml b/futures/Cargo.toml index edf4a53853..038da9fc41 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -36,3 +36,4 @@ futures-util-preview = { path = "../futures-util", version = "0.3.0-alpha.1", de nightly = ["futures-util-preview/nightly"] std = ["futures-core-preview/std", "futures-executor-preview/std", "futures-io-preview/std", "futures-sink-preview/std", "futures-util-preview/std"] default = ["std"] +compat = ["std", "futures-util-preview/compat"] diff --git a/futures/src/lib.rs b/futures/src/lib.rs index c38afe54d6..47d8d6f854 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -79,6 +79,19 @@ pub mod channel { pub use futures_channel::{oneshot, mpsc}; } +#[cfg(feature = "compat")] +pub mod compat { + //! Interop between `futures` 0.1 and 0.3. + //! + + pub use futures_util::compat::{ + Compat, CompatExecutor, + ExecutorFuture01, + Executor01CompatExt, + Future01Ext, + }; +} + #[cfg(feature = "std")] pub mod executor { //! Task execution.