chore: fix rustfmt error

This commit is contained in:
gengteng
2024-03-01 10:44:27 +08:00
parent efd7f9b42b
commit ec2005a7a4
4 changed files with 88 additions and 80 deletions

View File

@@ -964,7 +964,9 @@ mod sonic {
pub const SONIC: &str = "/sonic";
}
pub async fn extract_sonic(Garde(Sonic(parameters)): Garde<Sonic<ParametersGarde>>) -> StatusCode {
pub async fn extract_sonic(
Garde(Sonic(parameters)): Garde<Sonic<ParametersGarde>>,
) -> StatusCode {
validate_again(parameters, ())
}
}

View File

@@ -23,13 +23,13 @@ pub mod validify;
#[cfg(feature = "yaml")]
pub mod yaml;
mod sonic;
#[cfg(feature = "toml")]
pub mod toml;
#[cfg(feature = "typed_multipart")]
pub mod typed_multipart;
#[cfg(feature = "xml")]
pub mod xml;
mod sonic;
use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};

View File

@@ -1045,7 +1045,10 @@ async fn test_main() -> anyhow::Result<()> {
.await?;
// Modified
test_executor
.execute_modified::<Sonic<ParametersValidify>>(Method::POST, sonic::route::SONIC_MODIFIED)
.execute_modified::<Sonic<ParametersValidify>>(
Method::POST,
sonic::route::SONIC_MODIFIED,
)
.await?;
// Validified
test_executor
@@ -1056,7 +1059,10 @@ async fn test_main() -> anyhow::Result<()> {
.await?;
// ValidifiedByRef
test_executor
.execute::<Sonic<ParametersValidify>>(Method::POST, sonic::route::SONIC_VALIDIFIED_BY_REF)
.execute::<Sonic<ParametersValidify>>(
Method::POST,
sonic::route::SONIC_VALIDIFIED_BY_REF,
)
.await?;
}