strip session-added comments
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
//! JSON API extractors whose rejections are refused in the one error shape.
|
||||
|
||||
use axum::{
|
||||
extract::{
|
||||
FromRequest, FromRequestParts, Multipart, Path, Query, Request,
|
||||
@@ -13,10 +11,6 @@ use serde::de::DeserializeOwned;
|
||||
|
||||
use crate::errors::{INTERNAL, INVALID_INPUT, refuse};
|
||||
|
||||
/// Malformed request (bad JSON, query or path), refused as `INVALID_INPUT`.
|
||||
/// Status follows axum: 400 syntax, 415 content type, 422 data errors, 413 size.
|
||||
/// A rejection with a 5xx status is a server-side fault (e.g. a route that
|
||||
/// declares no path parameter), refused as `INTERNAL`.
|
||||
pub struct MalformedRequest {
|
||||
status: StatusCode,
|
||||
message: String,
|
||||
@@ -69,7 +63,6 @@ impl From<MultipartRejection> for MalformedRequest {
|
||||
}
|
||||
}
|
||||
|
||||
/// `axum::extract::Multipart` with refusals in the one error shape.
|
||||
pub struct Upload(pub Multipart);
|
||||
|
||||
impl<S> FromRequest<S> for Upload
|
||||
@@ -83,7 +76,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// `axum::Json` with refusals in the one error shape.
|
||||
pub struct Body<T>(pub T);
|
||||
|
||||
impl<S, T> FromRequest<S> for Body<T>
|
||||
@@ -99,7 +91,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// `axum::extract::Query` with refusals in the one error shape.
|
||||
pub struct Params<T>(pub T);
|
||||
|
||||
impl<S, T> FromRequestParts<S> for Params<T>
|
||||
@@ -115,7 +106,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// `axum::extract::Path` with refusals in the one error shape.
|
||||
pub struct PathId<T>(pub T);
|
||||
|
||||
impl<S, T> FromRequestParts<S> for PathId<T>
|
||||
|
||||
Reference in New Issue
Block a user