Update empty Map to_repr to match syntax

Empty Map will output `[:]` instead of `[]` now

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-10-15 19:00:07 -07:00
parent c286937e0a
commit 07a59c8930

View File

@@ -135,7 +135,7 @@ impl Map {
let this_borrowed = this.borrow(); let this_borrowed = this.borrow();
let map_obj = this_borrowed.as_any().downcast_ref::<Map>().unwrap(); let map_obj = this_borrowed.as_any().downcast_ref::<Map>().unwrap();
if map_obj.table().len() == 0 { if map_obj.table().len() == 0 {
return Str::create("[]"); return Str::create("[:]");
} }
let mut repr = "[".to_string(); let mut repr = "[".to_string();