diff --git a/awc/CHANGES.md b/awc/CHANGES.md index 04f1a0dbe..211db5a80 100644 --- a/awc/CHANGES.md +++ b/awc/CHANGES.md @@ -20,6 +20,7 @@ [#2024]: https://github.com/actix/actix-web/pull/2024 [#2050]: https://github.com/actix/actix-web/pull/2050 + ## 3.0.0-beta.2 - 2021-02-10 ### Added * `ClientRequest::insert_header` method which allows using typed headers. [#1869] diff --git a/awc/src/request.rs b/awc/src/request.rs index 16b4fb584..1b63f3687 100644 --- a/awc/src/request.rs +++ b/awc/src/request.rs @@ -255,11 +255,7 @@ impl ClientRequest { /// Set HTTP basic authorization header. /// /// If no password is needed, just provide an empty string. - pub fn basic_auth( - self, - username: impl fmt::Display, - password: impl fmt::Display, - ) -> Self { + pub fn basic_auth(self, username: impl fmt::Display, password: impl fmt::Display) -> Self { let auth = format!("{}:{}", username, password); self.insert_header(( @@ -642,9 +638,7 @@ mod tests { #[actix_rt::test] async fn client_basic_auth() { - let req = Client::new() - .get("/") - .basic_auth("username", "password"); + let req = Client::new().get("/").basic_auth("username", "password"); assert_eq!( req.head .headers