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

Function print_table_rows

src/display.rs:444–456  ·  view source on GitHub ↗

Print rows of label-value pairs in a bordered table.

(rows: &[Vec<(&str, String)>], cell_width: usize, num_cols: usize)

Source from the content-addressed store, hash-verified

442
443/// Print rows of label-value pairs in a bordered table.
444fn print_table_rows(rows: &[Vec<(&str, String)>], cell_width: usize, num_cols: usize) {
445 for row in rows {
446 print!("│");
447 for (i, (label, value)) in row.iter().enumerate() {
448 if label.is_empty() {
449 print!("{}", " ".repeat(cell_width));
450 } else {
451 print!("{}", format_cell(label, value, cell_width));
452 }
453 print!("{}", if i < num_cols - 1 { "│" } else { "│\n" });
454 }
455 }
456}
457
458pub fn print_gain_total(project: &str, range: &str, saved_tokens: u64, calls: u64, usd: f64) {
459 let saved_str = format_token_count(saved_tokens);

Callers 1

print_status_tableFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected