diff --git a/tonic/src/body.rs b/tonic/src/body.rs index 53a917e..ef95eec 100644 --- a/tonic/src/body.rs +++ b/tonic/src/body.rs @@ -14,8 +14,6 @@ where body.map_err(crate::Status::map_error).boxed_unsync() } -// this also exists in `crate::codegen` but we need it here since `codegen` has -// `#[cfg(feature = "codegen")]`. /// Create an empty `BoxBody` pub fn empty_body() -> BoxBody { http_body::Empty::new() diff --git a/tonic/src/codegen.rs b/tonic/src/codegen.rs index b8dd39c..09a504c 100644 --- a/tonic/src/codegen.rs +++ b/tonic/src/codegen.rs @@ -23,8 +23,4 @@ pub mod http { pub use http::*; } -pub fn empty_body() -> crate::body::BoxBody { - http_body::Empty::new() - .map_err(|err| match err {}) - .boxed_unsync() -} +pub use crate::body::empty_body;