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)) (axum::http::StatusCode::OK, axum::Json(response))
} }
Err(err) => { Err(err) => match err {
match err { sqlx::Error::RowNotFound => {
sqlx::Error::RowNotFound => { response.message = String::from("Nothing to fetch");
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:?}"); eprintln!("Error: {err:?}");
response.message = String::from("Error"); response.message = String::from("Error");
( (
axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response), axum::Json(response),
) )
}
} }
} },
} }
} }
+4 -8
View File
@@ -106,14 +106,10 @@ pub async fn fetch(
.fetch_one(pool) .fetch_one(pool)
.await .await
{ {
Ok(row) => { Ok(row) => match parse_row(&row).await {
match parse_row(&row).await { Ok(scheduled_message) => Ok(scheduled_message),
Ok(scheduled_message) => { Err(err) => Err(err),
Ok(scheduled_message) },
}
Err(err) => Err(err)
}
}
Err(err) => Err(err), Err(err) => Err(err),
} }
} }