Skip to content

Commit

Permalink
fix: cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbovbel committed Jul 15, 2024
1 parent 7472056 commit 9796512
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/runtime/src/console/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,14 @@ impl Console {
fn print_table(value_vec: &Vec<String>) {
let max_value_width = value_vec.iter().map(|value| value.len()).max().unwrap_or(0);

println!("┌─────────┬─{:─<width$}────┐", "", width = max_value_width + 2);
println!("│ (index) │ Values{:>width$} │", "", width = if max_value_width < 1 { 0 } else { max_value_width - 1});
println!("├─────────┼{:─<width$}─────┤", "", width = max_value_width + 2);
println!("┌─────────┬─{:─<width$}──────┐", "", width = max_value_width);
println!("│ (index) │ Values{:>width$}│", "", width = max_value_width);
println!("├─────────┼{:─<width$}───────┤", "", width = max_value_width);

for (i, el) in value_vec.iter().enumerate() {
println!("│ {:<7} │ {:<width$} │", i, el, width = max_value_width);
}
println!("└─────────┴{:─<width$}─────┘", "", width = max_value_width + 2);
println!("└─────────┴{:─<width$}───────┘", "", width = max_value_width);
}

for arg in args {
Expand Down

0 comments on commit 9796512

Please sign in to comment.