(progress: &ProgressDetail)
| 1680 | } |
| 1681 | |
| 1682 | fn format_progress_detail(progress: &ProgressDetail) -> Option<String> { |
| 1683 | let current = progress.current.and_then(|value| u64::try_from(value).ok()); |
| 1684 | let total = progress |
| 1685 | .total |
| 1686 | .and_then(|value| u64::try_from(value).ok()) |
| 1687 | .filter(|value| *value > 0); |
| 1688 | |
| 1689 | match (current, total) { |
| 1690 | (Some(current), Some(total)) => { |
| 1691 | Some(format!("{}/{}", format_bytes(current), format_bytes(total))) |
| 1692 | } |
| 1693 | (Some(current), _) if current > 0 => Some(format_bytes(current)), |
| 1694 | _ => None, |
| 1695 | } |
| 1696 | } |
| 1697 | |
| 1698 | fn attach_docker_progress_metadata( |
| 1699 | metadata: &mut HashMap<String, String>, |
nothing calls this directly
no test coverage detected