mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-25 00:00:23 +02:00
Generate correct bound for non-last extractor in #[debug_handler] (#1299)
* Support running a single UI test * Generate correct `FromRequestParts` bound * don't depend on itertools
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use axum::{async_trait, extract::FromRequest, http::Request, response::IntoResponse};
|
||||
use axum::{async_trait, extract::FromRequestParts, http::request::Parts, response::IntoResponse};
|
||||
use axum_macros::debug_handler;
|
||||
|
||||
fn main() {}
|
||||
@@ -116,14 +116,13 @@ impl A {
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl<S, B> FromRequest<S, B> for A
|
||||
impl<S> FromRequestParts<S> for A
|
||||
where
|
||||
B: Send + 'static,
|
||||
S: Send + Sync,
|
||||
{
|
||||
type Rejection = ();
|
||||
|
||||
async fn from_request(_req: Request<B>, _state: &S) -> Result<Self, Self::Rejection> {
|
||||
async fn from_request_parts(_parts: &mut Parts, _state: &S) -> Result<Self, Self::Rejection> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user