Remove the associated Body type on IntoResponse (#571)

This commit is contained in:
Kai Jewson
2021-11-28 18:52:18 +01:00
committed by GitHub
parent decdd4c948
commit 2b6dba49cb
25 changed files with 171 additions and 358 deletions
+2 -5
View File
@@ -9,7 +9,7 @@
use async_session::{MemoryStore, Session, SessionStore};
use axum::{
async_trait,
body::{Bytes, Empty},
body::BoxBody,
extract::{Extension, FromRequest, Query, RequestParts, TypedHeader},
http::{header::SET_COOKIE, HeaderMap, Response},
response::{IntoResponse, Redirect},
@@ -199,10 +199,7 @@ async fn login_authorized(
struct AuthRedirect;
impl IntoResponse for AuthRedirect {
type Body = Empty<Bytes>;
type BodyError = <Self::Body as axum::body::HttpBody>::Error;
fn into_response(self) -> Response<Self::Body> {
fn into_response(self) -> Response<BoxBody> {
Redirect::found("/auth/discord".parse().unwrap()).into_response()
}
}