MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / print_kind_rows

Function print_kind_rows

src/display.rs:492–511  ·  view source on GitHub ↗

Print node kinds in column-major order.

(
    sorted_kinds: &[(&String, &u64)],
    num_kind_rows: usize,
    num_cols: usize,
    cell_width: usize,
)

Source from the content-addressed store, hash-verified

490
491/// Print node kinds in column-major order.
492fn 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}

Callers 1

print_status_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected