From 5a9ca6eeb311f3f6987269f3271b26d6559007a4 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 6 Dec 2021 14:50:06 +0000 Subject: [PATCH] fix changelog --- actix-http/CHANGES.md | 1 - actix-http/src/h1/dispatcher.rs | 3 +-- actix-http/src/h2/dispatcher.rs | 2 +- src/test.rs | 24 +++--------------------- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/actix-http/CHANGES.md b/actix-http/CHANGES.md index 526ef621c..f435784d8 100644 --- a/actix-http/CHANGES.md +++ b/actix-http/CHANGES.md @@ -36,7 +36,6 @@ * `impl TryFrom` for `header::Quality`. [#2486] * `http` module. Most everything it contained is exported at the crate root. [#2488] -[#2327]: https://github.com/actix/actix-web/pull/2327 [#2483]: https://github.com/actix/actix-web/pull/2483 [#2468]: https://github.com/actix/actix-web/pull/2468 [#1920]: https://github.com/actix/actix-web/pull/1920 diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index f1081ce18..b11054307 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -596,8 +596,7 @@ where Message::Item(mut req) => { req.head_mut().peer_addr = *this.peer_addr; - req.conn_data = - this.conn_data.as_ref().map(|data| Rc::clone(data)); + req.conn_data = this.conn_data.as_ref().map(Rc::clone); match this.codec.message_type() { // Request is upgradable. add upgrade message and break. diff --git a/actix-http/src/h2/dispatcher.rs b/actix-http/src/h2/dispatcher.rs index cd52ef483..22eab6c28 100644 --- a/actix-http/src/h2/dispatcher.rs +++ b/actix-http/src/h2/dispatcher.rs @@ -119,7 +119,7 @@ where head.headers = parts.headers.into(); head.peer_addr = this.peer_addr; - req.conn_data = this.conn_data.as_ref().map(|data| Rc::clone(data)); + req.conn_data = this.conn_data.as_ref().map(Rc::clone); let fut = this.flow.service.call(req); let config = this.config.clone(); diff --git a/src/test.rs b/src/test.rs index 1919c0d15..bff9c62dc 100644 --- a/src/test.rs +++ b/src/test.rs @@ -581,13 +581,7 @@ impl TestRequest { let app_state = AppInitServiceState::new(Rc::new(self.rmap), self.config.clone()); ServiceRequest::new( - HttpRequest::new( - self.path, - head, - app_state, - Rc::new(self.app_data), - Default::default(), - ), + HttpRequest::new(self.path, head, app_state, Rc::new(self.app_data), None), payload, ) } @@ -605,13 +599,7 @@ impl TestRequest { let app_state = AppInitServiceState::new(Rc::new(self.rmap), self.config.clone()); - HttpRequest::new( - self.path, - head, - app_state, - Rc::new(self.app_data), - Default::default(), - ) + HttpRequest::new(self.path, head, app_state, Rc::new(self.app_data), None) } /// Complete request creation and generate `HttpRequest` and `Payload` instances @@ -622,13 +610,7 @@ impl TestRequest { let app_state = AppInitServiceState::new(Rc::new(self.rmap), self.config.clone()); - let req = HttpRequest::new( - self.path, - head, - app_state, - Rc::new(self.app_data), - Default::default(), - ); + let req = HttpRequest::new(self.path, head, app_state, Rc::new(self.app_data), None); (req, payload) }