diff --git a/actix-http/src/payload.rs b/actix-http/src/payload.rs index 85bfc0b5a..5734af341 100644 --- a/actix-http/src/payload.rs +++ b/actix-http/src/payload.rs @@ -7,10 +7,10 @@ use h2::RecvStream; use crate::error::PayloadError; -/// Type represent boxed payload +/// A boxed payload. pub type PayloadStream = Pin>>>; -/// Type represent streaming payload +/// A streaming payload. pub enum Payload { None, H1(crate::h1::Payload), diff --git a/src/app_service.rs b/src/app_service.rs index cc5100f04..515693db4 100644 --- a/src/app_service.rs +++ b/src/app_service.rs @@ -22,6 +22,7 @@ use crate::{ type Guards = Vec>; /// Service factory to convert `Request` to a `ServiceRequest`. +/// /// It also executes data factories. pub struct AppInit where diff --git a/src/request.rs b/src/request.rs index d84722d95..07fb4eb2d 100644 --- a/src/request.rs +++ b/src/request.rs @@ -349,7 +349,7 @@ impl Drop for HttpRequest { fn drop(&mut self) { // if possible, contribute to current worker's HttpRequest allocation pool - // This relies on no Weak exists anywhere. (There is none.) + // This relies on no weak references to inner existing anywhere within the codebase. if let Some(inner) = Rc::get_mut(&mut self.inner) { if inner.app_state.pool().is_available() { // clear additional app_data and keep the root one for reuse. @@ -360,7 +360,7 @@ impl Drop for HttpRequest { Rc::get_mut(&mut inner.req_data).unwrap().get_mut().clear(); // a re-borrow of pool is necessary here. - let req = self.inner.clone(); + let req = Rc::clone(&self.inner); self.app_state().pool().push(req); } }