Skip to content

Commit

Permalink
fix(list): printer for length 0 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebffischer authored Oct 9, 2024
1 parent ebf4bc4 commit 0901ac0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ impl Display for Obj {
}

fn display_list(x: &List, f: &mut fmt::Formatter<'_>, bc: Option<String>) -> fmt::Result {
if x.is_empty() {
write!(f, "list()")?;
return Ok(());
}

for (i, (maybe_name, value)) in x.pairs_ref().iter().enumerate() {
if i > 0 {
writeln!(f)?
Expand Down

0 comments on commit 0901ac0

Please sign in to comment.