From 89806982a9a244d951a2c848a641b7f0a1dee94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Bene=C5=A1?= Date: Mon, 9 Nov 2026 13:02:06 +0000 Subject: [PATCH] watch: a type for a test's last run (clippy type_complexity) Co-Authored-By: Claude Opus 5.5 --- src-tauri/src/watch.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/watch.rs b/src-tauri/src/watch.rs index c8e4de4..4196157 100644 --- a/src-tauri/src/watch.rs +++ b/src-tauri/src/watch.rs @@ -172,7 +172,10 @@ mod tests { use super::*; use serde_json::json; - fn schedules(rows: &[(&str, Option<(&str, &str, bool)>)]) -> Value { + /// A schedule's last run in a test: its id, status, and whether the server tells of it. + type LastRun<'a> = Option<(&'a str, &'a str, bool)>; + + fn schedules(rows: &[(&str, LastRun)]) -> Value { json!({"schedules": rows.iter().map(|(id, run)| json!({ "id": id, "title": format!("Task {id}"), "last_run": run.map(|(r, status, told)| json!({"id": r, "status": status, "notified": told})),