mirror of
https://github.com/lov3b/ecb-rates.git
synced 2025-07-07 12:00:30 +02:00
Rounding
This commit is contained in:
@ -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 = format!("{:.5}", right);
|
||||
let right_str = right.to_string();
|
||||
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)?;
|
||||
|
Reference in New Issue
Block a user