tsk-203: Code formatting

This commit is contained in:
kdeng00
2025-10-27 13:53:33 -04:00
parent 8550af4569
commit 2399d7010d
+8 -6
View File
@@ -179,13 +179,15 @@ pub mod endpoint {
match repo::coverart::get_coverart(&pool, &id).await { match repo::coverart::get_coverart(&pool, &id).await {
Ok(coverart) => match icarus_models::coverart::io::to_data(&coverart) { Ok(coverart) => match icarus_models::coverart::io::to_data(&coverart) {
Ok(data) => { Ok(data) => {
let file_type = match icarus_meta::detection::coverart::file_type_from_data(&data) { let file_type =
Ok(file_type) => { match icarus_meta::detection::coverart::file_type_from_data(&data) {
file_type Ok(file_type) => file_type,
}
Err(err) => { Err(err) => {
eprintln!("Error: {err:?}"); eprintln!("Error: {err:?}");
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::response::Response::default()); return (
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::response::Response::default(),
);
} }
}; };
let bytes = axum::body::Bytes::from(data); let bytes = axum::body::Bytes::from(data);
@@ -193,7 +195,7 @@ pub mod endpoint {
let headers = response.headers_mut(); let headers = response.headers_mut();
headers.insert( headers.insert(
axum::http::header::CONTENT_TYPE, axum::http::header::CONTENT_TYPE,
file_type.mime.parse().unwrap() file_type.mime.parse().unwrap(),
); );
headers.insert( headers.insert(
axum::http::header::CONTENT_DISPOSITION, axum::http::header::CONTENT_DISPOSITION,