mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
Fix async await README example (#758)
* async-await: fix README example dependencies
As per commit "async-await: track nightly changes (#661)" ( commit
2f690d30bc)
> The `tokio-async-await` crate is no longer a facade. Instead, the
> `tokio` crate provides a feature flag to enable async/await support.
Ensure the example in the async-await README file also works by
correctly declaring this updated dependency
* async-await: remove unnecessary 'edition' declaration from README
As the "edition" feature was stabilized in rust v1.30 and async-await
specifies that the nightly toolchain must be used, remove the use of the
"edition" feature gate since it is enabled by default.
This commit is contained in:
@@ -13,14 +13,11 @@ To use this crate, you need to start with a Rust 2018 edition crate.
|
||||
Add this to your `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
# At the very top of the file
|
||||
cargo-features = ["edition"]
|
||||
|
||||
# In the `[packages]` section
|
||||
edition = "2018"
|
||||
|
||||
# In the `[dependencies]` section
|
||||
tokio-async-await = "0.1.0"
|
||||
tokio = {version = "0.1.0", features = ["async-await-preview"]}
|
||||
```
|
||||
|
||||
Then, get started. In your application, add:
|
||||
|
||||
Reference in New Issue
Block a user