Fix display of list
This commit is contained in:
parent
850b77541b
commit
f90bfb88ca
@ -95,8 +95,12 @@ impl fmt::Display for Expression {
|
||||
}
|
||||
ListLiteral(ref items) => {
|
||||
write!(f, "[ ");
|
||||
for item in items {
|
||||
write!(f, ", {}", item);
|
||||
let mut iter = items.iter().peekable();
|
||||
while let Some(item) = iter.next() {
|
||||
write!(f, "{}", item);
|
||||
if let Some(_) = iter.peek() {
|
||||
write!(f, ", ");
|
||||
}
|
||||
}
|
||||
write!(f, " ]")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user