From ceac97bb8d11053002987a3ba735fd265a9d65ea Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 4 Nov 2020 15:08:12 +0000 Subject: [PATCH 1/2] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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 + From 9b6a089b3675d07805ce4b184b6a317418c7e5da Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Thu, 5 Nov 2020 06:20:01 +0800 Subject: [PATCH 2/2] fix awc doc example (#1772) * fix awc readme example Co-authored-by: Rob Ede --- awc/README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) 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 + }); } ```