Perspective

This commit is contained in:
2025-01-08 21:03:15 +01:00
parent e20b7d22a5
commit 19646e0001
3 changed files with 38 additions and 4 deletions

View File

@ -36,7 +36,7 @@ pub fn helper_table_print<T: TableGet>(
for (left, right) in table.get_rows().iter() {
let left_str = left.as_ref();
let right_str = right.to_string();
let right_str = format!("{:.5}", right);
let padding_amount = width.saturating_sub(left_str.len() + right_str.len());
let padding = " ".repeat(padding_amount);
writeln!(f, "{}{}{}", left_str.bold().green(), padding, right_str)?;