improve into_boxed

This commit is contained in:
Rob Ede 2021-11-16 19:59:23 +00:00
parent 4c12f828c7
commit b3e187fe19
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 3 additions and 3 deletions

View File

@ -69,9 +69,9 @@ where
pub fn into_boxed(self) -> AnyBody { pub fn into_boxed(self) -> AnyBody {
match self { match self {
AnyBody::None => AnyBody::new_boxed(()), Self::None => AnyBody::None,
AnyBody::Bytes(body) => AnyBody::new_boxed(body), Self::Bytes(bytes) => AnyBody::Bytes(bytes),
AnyBody::Body(body) => AnyBody::new_boxed(body), Self::Body(body) => AnyBody::new_boxed(body),
} }
} }
} }