1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 12:45:41 +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

@@ -88,6 +88,14 @@ where
EitherBody::Right { body } => body.take_complete_body(),
}
}
#[inline]
fn boxed(self) -> BoxBody {
match self {
EitherBody::Left { body } => body.boxed(),
EitherBody::Right { body } => body.boxed(),
}
}
}
#[cfg(test)]