From b3e187fe1964a50b26553e70410b99f56caddb15 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 16 Nov 2021 19:59:23 +0000 Subject: [PATCH] improve into_boxed --- actix-http/src/body/body.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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), } } }