Add note about how to use tokio::main in examples (#745)

This commit is contained in:
Sean McArthur
2019-12-17 12:56:36 -08:00
committed by GitHub
parent c4c754c0fd
commit f78846b6f1
3 changed files with 10 additions and 4 deletions

View File

@@ -4,6 +4,9 @@
//! really care about the structure of the JSON and just need to display it or
//! process it at runtime.
// This is using the `tokio` runtime. You'll need the following dependency:
//
// `tokio = { version = "0.2", features = ["macros"] }`
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let echo_json: serde_json::Value = reqwest::Client::new()