mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-28 23:38:20 +01:00
Re-export http_body::Body
(#152)
Makes writing `IntoResponse` impls easier
This commit is contained in:
parent
4bb17cbc2d
commit
a38d5c3592
2 changed files with 3 additions and 2 deletions
|
@ -2,9 +2,10 @@
|
|||
|
||||
use crate::Error;
|
||||
use bytes::Bytes;
|
||||
use http_body::Body as _;
|
||||
use tower::BoxError;
|
||||
|
||||
#[doc(no_inline)]
|
||||
pub use http_body::Body as HttpBody;
|
||||
#[doc(no_inline)]
|
||||
pub use hyper::body::Body;
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ pub trait IntoResponse {
|
|||
/// Generally it should be possible to set this to:
|
||||
///
|
||||
/// ```rust,ignore
|
||||
/// type BodyError = <Self::Body as http_body::Body>::Error;
|
||||
/// type BodyError = <Self::Body as axum::body::HttpBody>::Error;
|
||||
/// ```
|
||||
///
|
||||
/// This associated type exists mainly to make returning `impl IntoResponse`
|
||||
|
|
Loading…
Reference in a new issue