mirror of https://github.com/stjepang/smol
Reexport FutureExt
This commit is contained in:
parent
6b17753027
commit
a3552bcadc
|
@ -22,7 +22,7 @@ async-executor = "0.1.1"
|
|||
async-io = "0.1.5"
|
||||
blocking = "0.5.0"
|
||||
easy-parallel = "3.1.0"
|
||||
futures-lite = "0.1.8"
|
||||
futures-lite = "0.1.9"
|
||||
num_cpus = "1.13.0"
|
||||
|
||||
[dependencies.tokio]
|
||||
|
|
|
@ -47,8 +47,8 @@ Look inside the [examples] directory for more.
|
|||
|
||||
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
|
||||
traits, and deliberately lacks documentation on integration with the larger Rust ecosystem.
|
||||
The only exception is [tokio], which is traditionally incompatible with [futures], breaks
|
||||
when used with other executors, and lacks documentation on how to fix such errors.
|
||||
Fortunately, there are ways around it.
|
||||
|
||||
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
|
||||
[futures]: https://docs.rs/futures
|
||||
|
||||
## TLS certificate
|
||||
|
||||
|
|
|
@ -34,9 +34,8 @@
|
|||
//!
|
||||
//! 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
|
||||
//! traits, and deliberately lacks documentation on integration with the larger Rust ecosystem.
|
||||
//! Fortunately, there are ways around it.
|
||||
//! The only exception is [tokio], which is traditionally incompatible with [futures] and crashes
|
||||
//! when called from other executors. Fortunately, there are ways around it.
|
||||
//!
|
||||
//! Enable the `tokio02` feature flag and [`smol::run()`][`crate::run()`] will create a minimal
|
||||
//! tokio runtime for its libraries:
|
||||
|
@ -47,6 +46,7 @@
|
|||
//! ```
|
||||
//!
|
||||
//! [tokio]: https://docs.rs/tokio
|
||||
//! [futures]: https://docs.rs/futures
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
||||
|
@ -77,7 +77,7 @@ pub use {
|
|||
pub mod prelude {
|
||||
#[doc(no_inline)]
|
||||
pub use futures_lite::{
|
||||
future::Future,
|
||||
future::{Future, FutureExt},
|
||||
io::{AsyncBufRead, AsyncBufReadExt},
|
||||
io::{AsyncRead, AsyncReadExt},
|
||||
io::{AsyncSeek, AsyncSeekExt},
|
||||
|
|
Loading…
Reference in New Issue