diff options
-rw-r--r-- | axum-extra/src/response/mod.rs | 8 | ||||
-rw-r--r-- | axum/src/response/mod.rs | 5 |
2 files changed, 2 insertions, 11 deletions
diff --git a/axum-extra/src/response/mod.rs b/axum-extra/src/response/mod.rs index 3b4b14c0..29b2d0e9 100644 --- a/axum-extra/src/response/mod.rs +++ b/axum-extra/src/response/mod.rs @@ -67,14 +67,6 @@ macro_rules! mime_response { } mime_response! { - /// A HTML response. - /// - /// Will automatically get `Content-Type: text/html; charset=utf-8`. - Html, - TEXT_HTML_UTF_8, -} - -mime_response! { /// A JavaScript response. /// /// Will automatically get `Content-Type: application/javascript; charset=utf-8`. diff --git a/axum/src/response/mod.rs b/axum/src/response/mod.rs index 6cfd9b07..632df5cb 100644 --- a/axum/src/response/mod.rs +++ b/axum/src/response/mod.rs @@ -1,6 +1,5 @@ #![doc = include_str!("../docs/response.md")] -use axum_core::body::Body; use http::{header, HeaderValue}; mod redirect; @@ -40,7 +39,7 @@ pub struct Html<T>(pub T); impl<T> IntoResponse for Html<T> where - T: Into<Body>, + T: IntoResponse, { fn into_response(self) -> Response { ( @@ -48,7 +47,7 @@ where header::CONTENT_TYPE, HeaderValue::from_static(mime::TEXT_HTML_UTF_8.as_ref()), )], - self.0.into(), + self.0, ) .into_response() } |