Skip to content

Commit

Permalink
Stablize pin feature (#814)
Browse files Browse the repository at this point in the history
Box::pinned has been renamed to Box::pin. Meanwhile, the pin feature
no longer requires an attribute to enable.

Fixes: #813
  • Loading branch information
balthild authored and seanmonstar committed Dec 28, 2018
1 parent c8a990e commit 03e2e86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tokio-async-await/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down
2 changes: 1 addition & 1 deletion tokio-async-await/src/compat/backward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down
1 change: 0 additions & 1 deletion tokio-async-await/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
async_await,
await_macro,
futures_api,
pin,
)]

#![doc(html_root_url = "https://docs.rs/tokio-async-await/0.1.4")]
Expand Down

0 comments on commit 03e2e86

Please sign in to comment.