(bytes: usize)
| 2845 | } |
| 2846 | |
| 2847 | fn format_byte_count(bytes: usize) -> String { |
| 2848 | const KIB: f64 = 1024.0; |
| 2849 | const MIB: f64 = KIB * 1024.0; |
| 2850 | const GIB: f64 = MIB * 1024.0; |
| 2851 | |
| 2852 | let bytes_f = bytes as f64; |
| 2853 | if bytes_f >= GIB { |
| 2854 | format!("{:.1}GiB", bytes_f / GIB) |
| 2855 | } else if bytes_f >= MIB { |
| 2856 | format!("{:.1}MiB", bytes_f / MIB) |
| 2857 | } else if bytes_f >= KIB { |
| 2858 | format!("{:.1}KiB", bytes_f / KIB) |
| 2859 | } else { |
| 2860 | format!("{}B", bytes) |
| 2861 | } |
| 2862 | } |
| 2863 | |
| 2864 | fn should_detect_renames(diff: &Diff) -> bool { |
| 2865 | let mut adds = 0usize; |
nothing calls this directly
no outgoing calls
no test coverage detected