mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Support customizing the request body type in #[debug_handler] (#595)
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
error: unexpected token
|
||||
--> tests/fail/attrs.rs:3:17
|
||||
|
|
||||
3 | #[debug_handler(foo)]
|
||||
| ^^^
|
||||
@@ -0,0 +1,5 @@
|
||||
error: unknown argument
|
||||
--> tests/fail/invalid_attrs.rs:3:17
|
||||
|
|
||||
3 | #[debug_handler(foo)]
|
||||
| ^^^
|
||||
@@ -0,0 +1,10 @@
|
||||
use axum::{body::BoxBody, http::Request};
|
||||
use axum_debug::debug_handler;
|
||||
|
||||
#[debug_handler(body = BoxBody)]
|
||||
async fn handler(_: Request<BoxBody>) {}
|
||||
|
||||
#[debug_handler(body = axum::body::BoxBody,)]
|
||||
async fn handler_with_trailing_comma_and_type_path(_: Request<axum::body::BoxBody>) {}
|
||||
|
||||
fn main() {}
|
||||
@@ -1,7 +1,4 @@
|
||||
use axum::{
|
||||
body::BoxBody,
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use axum::response::{IntoResponse, Response};
|
||||
use axum_debug::debug_handler;
|
||||
|
||||
struct A;
|
||||
|
||||
Reference in New Issue
Block a user