watch: a type for a test's last run (clippy type_complexity)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+4
-1
@@ -172,7 +172,10 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use serde_json::json;
|
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!({
|
json!({"schedules": rows.iter().map(|(id, run)| json!({
|
||||||
"id": id, "title": format!("Task {id}"),
|
"id": id, "title": format!("Task {id}"),
|
||||||
"last_run": run.map(|(r, status, told)| json!({"id": r, "status": status, "notified": told})),
|
"last_run": run.map(|(r, status, told)| json!({"id": r, "status": status, "notified": told})),
|
||||||
|
|||||||
Reference in new issue
Block a user