fix(web): fix compilation (#670)

Make tonic::body::empty_body public and use it instead of the old and non existant anymore BoxBody::empty()
This commit is contained in:
gmorer
2021-06-02 13:59:11 +02:00
committed by GitHub
parent 9cc14b79fb
commit e1993877c4
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ pub type BoxBody = http_body::combinators::BoxBody<bytes::Bytes, crate::Status>;
// this also exists in `crate::codegen` but we need it here since `codegen` has
// `#[cfg(feature = "codegen")]`.
pub(crate) fn empty_body() -> BoxBody {
/// Create an empty `BoxBody`
pub fn empty_body() -> BoxBody {
http_body::Empty::new().map_err(|err| match err {}).boxed()
}