Print node kinds in column-major order.
(
sorted_kinds: &[(&String, &u64)],
num_kind_rows: usize,
num_cols: usize,
cell_width: usize,
)
| 490 | |
| 491 | /// Print node kinds in column-major order. |
| 492 | fn print_kind_rows( |
| 493 | sorted_kinds: &[(&String, &u64)], |
| 494 | num_kind_rows: usize, |
| 495 | num_cols: usize, |
| 496 | cell_width: usize, |
| 497 | ) { |
| 498 | for r in 0..num_kind_rows { |
| 499 | print!("│"); |
| 500 | for c in 0..num_cols { |
| 501 | let idx = r + c * num_kind_rows; |
| 502 | if idx < sorted_kinds.len() { |
| 503 | let (kind, count) = &sorted_kinds[idx]; |
| 504 | print!("{}", format_cell(kind, &format_number(**count), cell_width)); |
| 505 | } else { |
| 506 | print!("{}", " ".repeat(cell_width)); |
| 507 | } |
| 508 | print!("{}", if c < num_cols - 1 { "│" } else { "│\n" }); |
| 509 | } |
| 510 | } |
| 511 | } |
no outgoing calls
no test coverage detected