chore(tonic): Remove duplicated code (#1267)

This commit is contained in:
tottoto
2023-02-14 14:47:11 +00:00
committed by GitHub
parent aa69a023f7
commit d9a8f10324
2 changed files with 1 additions and 7 deletions
-2
View File
@@ -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()
+1 -5
View File
@@ -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;