Remove weird 'invalid toml array of tables' printing

Closes #42
This commit is contained in:
Alex Crichton 2014-12-20 22:33:40 -08:00
parent f2f8d3fe6e
commit 1346affca9

View file

@ -35,18 +35,11 @@ impl fmt::Show for Value {
}
Boolean(b) => write!(f, "{}", b),
Datetime(ref s) => write!(f, "{}", s),
Array(ref a) => {
match a.as_slice().head() {
Some(&Table(..)) =>
try!(write!(f, "invalid toml array of tables")),
_ => {}
}
write!(f, "{}", a)
}
Table(ref t) => {
let mut p = Printer { output: f, stack: Vec::new() };
p.print(t)
}
Array(ref a) => write!(f, "{}", a),
}
}
}