Stablize pin feature (#814)

Box::pinned has been renamed to Box::pin. Meanwhile, the pin feature
no longer requires an attribute to enable.

Fixes: #813
This commit is contained in:
Balthild Ires 2018-12-29 04:12:31 +08:00 committed by Sean McArthur
parent c8a990eda4
commit 03e2e864f3
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,8 @@ guarantees. You are living on the edge here.**
## Usage
To use this crate, you need to start with a Rust 2018 edition crate.
To use this crate, you need to start with a Rust 2018 edition crate, with rustc
1.33.0-nightly or later.
Add this to your `Cargo.toml`:

View File

@ -19,7 +19,7 @@ pub struct Compat<T>(Pin<Box<T>>);
impl<T> Compat<T> {
/// Create a new `Compat` backed by `future`.
pub fn new(future: T) -> Compat<T> {
Compat(Box::pinned(future))
Compat(Box::pin(future))
}
}

View File

@ -5,7 +5,6 @@
async_await,
await_macro,
futures_api,
pin,
)]
#![doc(html_root_url = "https://docs.rs/tokio-async-await/0.1.4")]