1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

MessageBody::boxed (#2520)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
Ali MJ Al-Nasrawy
2021-12-17 03:43:40 +03:00
committed by GitHub
parent 44b7302845
commit 3c0d059d92
8 changed files with 40 additions and 10 deletions

View File

@ -45,9 +45,7 @@ impl AnyBody {
where
B: MessageBody + 'static,
{
Self::Body {
body: BoxBody::new(body),
}
Self::Body { body: body.boxed() }
}
/// Constructs new `AnyBody` instance from a slice of bytes by copying it.