diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3e62958d8..d8c6d66ca 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,15 @@ blank_issues_enabled: true contact_links: - - name: Gitter channel (actix-web) + - name: GitHub Discussions + url: https://github.com/actix/actix-web/discussions + about: Actix Web Q&A + - name: Gitter chat (actix-web) url: https://gitter.im/actix/actix-web - about: Please ask and answer questions about the actix-web here. - - name: Gitter channel (actix) + about: Actix Web Q&A + - name: Gitter chat (actix) url: https://gitter.im/actix/actix - about: Please ask and answer questions about the actix here. + about: Actix (actor framework) Q&A + - name: Actix Discord + url: https://discord.gg/NWpN5mmg3x + about: Actix developer discussion and community chat + diff --git a/awc/README.md b/awc/README.md index fb2468b4a..cbe299aaf 100644 --- a/awc/README.md +++ b/awc/README.md @@ -16,23 +16,21 @@ - Minimum Supported Rust Version (MSRV): 1.42.0 ## Example - ```rust use actix_rt::System; use awc::Client; -use futures::future::{Future, lazy}; fn main() { - System::new("test").block_on(lazy(|| { - let mut client = Client::default(); + System::new("test").block_on(async { + let client = Client::default(); - client.get("http://www.rust-lang.org") // <- Create request builder - .header("User-Agent", "Actix-web") - .send() // <- Send http request - .and_then(|response| { // <- server http response - println!("Response: {:?}", response); - Ok(()) - }) - })); + let res = client + .get("http://www.rust-lang.org") // <- Create request builder + .header("User-Agent", "Actix-web") + .send() // <- Send http request + .await; + + println!("Response: {:?}", res); // <- server http response + }); } ```