Reexport FutureExt

This commit is contained in:
Stjepan Glavina 2020-07-23 23:50:31 +02:00
parent 6b17753027
commit a3552bcadc
3 changed files with 8 additions and 7 deletions

View File

@ -22,7 +22,7 @@ async-executor = "0.1.1"
async-io = "0.1.5" async-io = "0.1.5"
blocking = "0.5.0" blocking = "0.5.0"
easy-parallel = "3.1.0" easy-parallel = "3.1.0"
futures-lite = "0.1.8" futures-lite = "0.1.9"
num_cpus = "1.13.0" num_cpus = "1.13.0"
[dependencies.tokio] [dependencies.tokio]

View File

@ -47,8 +47,8 @@ Look inside the [examples] directory for more.
All async libraries work with smol out of the box. All async libraries work with smol out of the box.
However, [tokio] is generally hostile towards non-tokio libraries, insists on non-standard I/O The only exception is [tokio], which is traditionally incompatible with [futures], breaks
traits, and deliberately lacks documentation on integration with the larger Rust ecosystem. when used with other executors, and lacks documentation on how to fix such errors.
Fortunately, there are ways around it. Fortunately, there are ways around it.
Enable the `tokio02` feature flag and `smol::run()` will create a minimal Enable the `tokio02` feature flag and `smol::run()` will create a minimal
@ -60,6 +60,7 @@ smol = { version = "0.3", features = ["tokio02"] }
``` ```
[tokio]: https://docs.rs/tokio [tokio]: https://docs.rs/tokio
[futures]: https://docs.rs/futures
## TLS certificate ## TLS certificate

View File

@ -34,9 +34,8 @@
//! //!
//! All async libraries work with smol out of the box. //! All async libraries work with smol out of the box.
//! //!
//! However, [tokio] is generally hostile towards non-tokio libraries, insists on non-standard I/O //! The only exception is [tokio], which is traditionally incompatible with [futures] and crashes
//! traits, and deliberately lacks documentation on integration with the larger Rust ecosystem. //! when called from other executors. Fortunately, there are ways around it.
//! Fortunately, there are ways around it.
//! //!
//! Enable the `tokio02` feature flag and [`smol::run()`][`crate::run()`] will create a minimal //! Enable the `tokio02` feature flag and [`smol::run()`][`crate::run()`] will create a minimal
//! tokio runtime for its libraries: //! tokio runtime for its libraries:
@ -47,6 +46,7 @@
//! ``` //! ```
//! //!
//! [tokio]: https://docs.rs/tokio //! [tokio]: https://docs.rs/tokio
//! [futures]: https://docs.rs/futures
#![forbid(unsafe_code)] #![forbid(unsafe_code)]
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)] #![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
@ -77,7 +77,7 @@ pub use {
pub mod prelude { pub mod prelude {
#[doc(no_inline)] #[doc(no_inline)]
pub use futures_lite::{ pub use futures_lite::{
future::Future, future::{Future, FutureExt},
io::{AsyncBufRead, AsyncBufReadExt}, io::{AsyncBufRead, AsyncBufReadExt},
io::{AsyncRead, AsyncReadExt}, io::{AsyncRead, AsyncReadExt},
io::{AsyncSeek, AsyncSeekExt}, io::{AsyncSeek, AsyncSeekExt},