mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-09 00:00:12 +02:00
Use inline format args (#2232)
This commit is contained in:
@@ -33,7 +33,7 @@ pin_project! {
|
||||
/// let file = File::open("Cargo.toml")
|
||||
/// .await
|
||||
/// .map_err(|err| {
|
||||
/// (StatusCode::NOT_FOUND, format!("File not found: {}", err))
|
||||
/// (StatusCode::NOT_FOUND, format!("File not found: {err}"))
|
||||
/// })?;
|
||||
///
|
||||
/// let headers = [(CONTENT_TYPE, "text/x-toml")];
|
||||
|
||||
@@ -83,7 +83,7 @@ impl IntoResponse for FormRejection {
|
||||
Self::RawFormRejection(inner) => inner.into_response(),
|
||||
Self::FailedToDeserializeForm(inner) => (
|
||||
StatusCode::BAD_REQUEST,
|
||||
format!("Failed to deserialize form: {}", inner),
|
||||
format!("Failed to deserialize form: {inner}"),
|
||||
)
|
||||
.into_response(),
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ impl IntoResponse for QueryRejection {
|
||||
match self {
|
||||
Self::FailedToDeserializeQueryString(inner) => (
|
||||
StatusCode::BAD_REQUEST,
|
||||
format!("Failed to deserialize query string: {}", inner),
|
||||
format!("Failed to deserialize query string: {inner}"),
|
||||
)
|
||||
.into_response(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user