chore(rust): update lockfile and format sources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-20 15:59:28 +09:00
co-authored by Copilot
parent 723017a11c
commit d05bd8a08d
25 changed files with 390 additions and 177 deletions
+8 -7
View File
@@ -13,13 +13,14 @@ impl MDRSConnection {
let resp = self.get("v3/laboratories/").await?;
// The API may return a paginated object or a direct array
let text = resp.text().await?;
let items: Vec<Laboratory> = if let Ok(list) = serde_json::from_str::<Vec<Laboratory>>(&text) {
list
} else if let Ok(paged) = serde_json::from_str::<LabListResponse>(&text) {
paged.results.unwrap_or_default()
} else {
vec![]
};
let items: Vec<Laboratory> =
if let Ok(list) = serde_json::from_str::<Vec<Laboratory>>(&text) {
list
} else if let Ok(paged) = serde_json::from_str::<LabListResponse>(&text) {
paged.results.unwrap_or_default()
} else {
vec![]
};
Ok(Laboratories { items })
}
}