fixed pretty print bug

This commit is contained in:
Erin 2022-07-24 22:00:25 +02:00 committed by ondra05
parent 07a6df43ff
commit 08d032998c

View file

@ -21,7 +21,7 @@ impl<'a> Display for Expr<'a> {
match self { match self {
Self::List(list) => write_seq(f, list, "(", ")"), Self::List(list) => write_seq(f, list, "(", ")"),
Self::Vector(vec) => write_seq(f, vec, "[", "]"), Self::Vector(vec) => write_seq(f, vec, "[", "]"),
Self::Map(map) => write_seq(f, map.iter().map(|(k, v)| format!("{k} {v}")), "[", "]"), Self::Map(map) => write_seq(f, map.iter().map(|(k, v)| format!("{k} {v}")), "{", "}"),
Self::Symbol(sym) => write!(f, "{sym}"), Self::Symbol(sym) => write!(f, "{sym}"),
Self::Keyword(kw) => write!(f, ":{kw}"), Self::Keyword(kw) => write!(f, ":{kw}"),
Self::Number(n) => write!(f, "{n}"), Self::Number(n) => write!(f, "{n}"),