cargo fmt
Rust Build / Test Suite (pull_request) Successful in 40s
Rust Build / Rustfmt (pull_request) Successful in 40s

This commit is contained in:
2026-06-20 11:26:49 -04:00
parent fe2d0ddffd
commit ce48ea1eed
2 changed files with 11 additions and 17 deletions
+7 -9
View File
@@ -269,23 +269,21 @@ pub mod endpoint {
(axum::http::StatusCode::OK, axum::Json(response))
}
Err(err) => {
match err {
sqlx::Error::RowNotFound => {
response.message = String::from("Nothing to fetch");
Err(err) => match err {
sqlx::Error::RowNotFound => {
response.message = String::from("Nothing to fetch");
(axum::http::StatusCode::NO_CONTENT, axum::Json(response))
}
_ => {
(axum::http::StatusCode::NO_CONTENT, axum::Json(response))
}
_ => {
eprintln!("Error: {err:?}");
response.message = String::from("Error");
(
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
}
}
}
},
}
}
+4 -8
View File
@@ -106,14 +106,10 @@ pub async fn fetch(
.fetch_one(pool)
.await
{
Ok(row) => {
match parse_row(&row).await {
Ok(scheduled_message) => {
Ok(scheduled_message)
}
Err(err) => Err(err)
}
}
Ok(row) => match parse_row(&row).await {
Ok(scheduled_message) => Ok(scheduled_message),
Err(err) => Err(err),
},
Err(err) => Err(err),
}
}