Skip to content

Commit

Permalink
fix: spacing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbovbel committed Jul 15, 2024
1 parent 49b7381 commit 7472056
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 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 < 5 { 0 } else { max_value_width - 4});
println!("├─────────┼{:─<width$}──┤", "", width = max_value_width + 2);
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);

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

for arg in args {
Expand Down Expand Up @@ -460,8 +460,14 @@ impl Console {
print_table(&value_vec);
}
if obj.is_ordinary() {
//when doing new Class()
println!("ordinary")
let borrowed_object = obj.borrow();

let key_value_array = borrowed_object.properties().index_properties();
for key_value in key_value_array {
let lol = key_value.0;
println!("{lol}");
}

}
}

Expand Down

0 comments on commit 7472056

Please sign in to comment.