(ids: Option<&[WorkerId]>, worker_map: &'a WorkerMap)
| 1523 | } |
| 1524 | |
| 1525 | fn format_workers<'a>(ids: Option<&[WorkerId]>, worker_map: &'a WorkerMap) -> Cow<'a, str> { |
| 1526 | match ids { |
| 1527 | Some(ids) => { |
| 1528 | if ids.len() == 1 { |
| 1529 | format_worker(ids[0], worker_map).into() |
| 1530 | } else { |
| 1531 | assert!(!ids.is_empty()); |
| 1532 | let mut result = String::new(); |
| 1533 | for id in ids { |
| 1534 | result.push_str(format_worker(*id, worker_map)); |
| 1535 | result.push('\n'); |
| 1536 | } |
| 1537 | result.into() |
| 1538 | } |
| 1539 | } |
| 1540 | None => "".into(), |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | fn get_task_time(state: &JobTaskState) -> (Option<DateTime<Utc>>, Option<DateTime<Utc>>) { |
| 1545 | match state { |
nothing calls this directly
no test coverage detected