mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Introduce Response type alias as a shorthand for Response<BoxBody> (#590)
* Introduce `Response` type alias as a shorthand * Don't re-export `Response` at the crate root
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use axum::{
|
||||
body::{self, BoxBody, Full},
|
||||
http::{header, HeaderValue, Response, StatusCode},
|
||||
response::IntoResponse,
|
||||
body::{self, Full},
|
||||
http::{header, HeaderValue, StatusCode},
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -39,7 +39,7 @@ impl ErasedJson {
|
||||
}
|
||||
|
||||
impl IntoResponse for ErasedJson {
|
||||
fn into_response(self) -> Response<BoxBody> {
|
||||
fn into_response(self) -> Response {
|
||||
let bytes = match self.0 {
|
||||
Ok(res) => res,
|
||||
Err(err) => {
|
||||
|
||||
Reference in New Issue
Block a user