TODO: Serde won't make empty-vec

This commit is contained in:
2025-05-24 18:17:41 -05:00
parent d4ec677b28
commit 0f4f2ee48f

View File

@@ -60,6 +60,9 @@ async fn do_list_releases(
.header(ACCEPT, "application/json") .header(ACCEPT, "application/json")
.send() .send()
.await?; .await?;
// TODO: Handle case with no releases.
// afaict: Serde tries to unpack an empty list, can't decide what struct it's unpacking,
// and emits an error. Desired behavior: empty Vec.
let body_text: Vec<ReleaseInfo> = response.json().await?; let body_text: Vec<ReleaseInfo> = response.json().await?;
return Ok(body_text); return Ok(body_text);
} }