1
0
Fork 0
mirror of https://github.com/tokio-rs/axum.git synced 2025-03-26 00:27:01 +01:00

fmt(customize-extractor-error): missing fmt

This commit is contained in:
Altair-Bueno 2022-08-15 20:04:09 +02:00
parent d61d305ffe
commit f9200bf4b9

View file

@ -5,10 +5,8 @@
//! ```
use axum::{
extract::rejection::JsonRejection,
http::StatusCode,
response::IntoResponse,
routing::post, Json, Router,
extract::rejection::JsonRejection, http::StatusCode, response::IntoResponse, routing::post,
Json, Router,
};
use axum_extra::extract::WithRejection;
use serde::Deserialize;
@ -42,7 +40,7 @@ async fn handler(
// `WithRejection` will extract `Json<User>` from the request. If the
// extraction fails, a `MyRejection` will be created from `JsonResponse` and
// returned to the client
WithRejection(Json(user), _): WithRejection<Json<User>, MyRejection>
WithRejection(Json(user), _): WithRejection<Json<User>, MyRejection>,
) {
dbg!(&user);
}