diff --git a/src/callers/song.rs b/src/callers/song.rs index 724cd8a..7d23857 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -438,13 +438,9 @@ mod song_queue { .map_err(|_e| sqlx::Error::RowNotFound) .unwrap(), user_id: match user_id_result { - Ok(id) => { - id - } - Err(_) => { - uuid::Uuid::nil() - } - } + Ok(id) => id, + Err(_) => uuid::Uuid::nil(), + }, }; Ok(song_queue) @@ -565,13 +561,9 @@ mod song_queue { .map_err(|_e| sqlx::Error::RowNotFound) .unwrap(), user_id: match user_id_result { - Ok(id) => { - id - } - Err(_) => { - uuid::Uuid::nil() - } - } + Ok(id) => id, + Err(_) => uuid::Uuid::nil(), + }, }; Ok(song_queue) diff --git a/src/main.rs b/src/main.rs index 9594e98..90645e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -493,30 +493,36 @@ mod tests { // match super::get_resp_data::(response).await { match super::song_queue_link_req(&app, &song_queue_id, &user_id).await { - Ok(response) => { - let resp = super::get_resp_data::(response).await; - assert_eq!(false, resp.data.is_empty(), "The response should not be empty"); + Ok(response) => { + let resp = super::get_resp_data::< + crate::callers::song::response::link_user_id::Response, + >(response) + .await; + assert_eq!( + false, + resp.data.is_empty(), + "The response should not be empty" + ); - match super::queue_metadata_req(&app, &song_queue_id).await { - Ok(response) => { - let resp = super::get_resp_data::< - crate::callers::song::response::Response, - >(response) - .await; - assert_eq!(false, resp.data.is_empty(), "Should not be empty"); + match super::queue_metadata_req(&app, &song_queue_id).await { + Ok(response) => { + let resp = super::get_resp_data::< + crate::callers::song::response::Response, + >(response) + .await; + assert_eq!(false, resp.data.is_empty(), "Should not be empty"); - let id = resp.data[0]; + let id = resp.data[0]; - match super::fetch_metadata_queue_req(&app, &id).await { - Ok(response) => Ok((response, user_id)), - Err(err) => Err(err), - } + match super::fetch_metadata_queue_req(&app, &id).await { + Ok(response) => Ok((response, user_id)), + Err(err) => Err(err), } } + } } - Err(err) => Err(err) + Err(err) => Err(err), } - } Err(err) => Err(err), }