diff options
author | Balthild Ires <stingzz.go@gmail.com> | 2018-12-29 04:12:31 +0800 |
---|---|---|
committer | Sean McArthur <sean@seanmonstar.com> | 2018-12-28 12:12:31 -0800 |
commit | 03e2e864f37c565d209f3118da771cd2c9f1d680 (patch) | |
tree | 46ccce0f854879b1b4f1e081b18545f3e79fa7a6 | |
parent | c8a990eda470fb9b66b1cd9cd384010d1019673a (diff) |
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
-rw-r--r-- | tokio-async-await/README.md | 3 | ||||
-rw-r--r-- | tokio-async-await/src/compat/backward.rs | 2 | ||||
-rw-r--r-- | tokio-async-await/src/lib.rs | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tokio-async-await/README.md b/tokio-async-await/README.md index 53fe6134..3ed1f2a1 100644 --- a/tokio-async-await/README.md +++ b/tokio-async-await/README.md @@ -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`: diff --git a/tokio-async-await/src/compat/backward.rs b/tokio-async-await/src/compat/backward.rs index b4e72547..53a3fdf5 100644 --- a/tokio-async-await/src/compat/backward.rs +++ b/tokio-async-await/src/compat/backward.rs @@ -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)) } } diff --git a/tokio-async-await/src/lib.rs b/tokio-async-await/src/lib.rs index 8d4915b9..b06b5b7e 100644 --- a/tokio-async-await/src/lib.rs +++ b/tokio-async-await/src/lib.rs @@ -5,7 +5,6 @@ async_await, await_macro, futures_api, - pin, )] #![doc(html_root_url = "https://docs.rs/tokio-async-await/0.1.4")] |