diff --git a/actix-http/src/body/body.rs b/actix-http/src/body/body.rs index a75bac728..b73c731e7 100644 --- a/actix-http/src/body/body.rs +++ b/actix-http/src/body/body.rs @@ -69,9 +69,9 @@ where pub fn into_boxed(self) -> AnyBody { match self { - AnyBody::None => AnyBody::new_boxed(()), - AnyBody::Bytes(body) => AnyBody::new_boxed(body), - AnyBody::Body(body) => AnyBody::new_boxed(body), + Self::None => AnyBody::None, + Self::Bytes(bytes) => AnyBody::Bytes(bytes), + Self::Body(body) => AnyBody::new_boxed(body), } } }