aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/show.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/show.rs b/src/show.rs
index b072277..a8a302e 100644
--- a/src/show.rs
+++ b/src/show.rs
@@ -36,8 +36,9 @@ impl fmt::Show for Value {
Datetime(ref s) => write!(f, "{}", s),
Array(ref a) => {
match a.as_slice().head() {
- Some(&Table(..)) => fail!("invalid toml array of tables"),
- _ => {}
+ Some(&Table(..)) =>
+ try!(write!(f, "invalid toml array of tables")),
+ _ => {}
}
write!(f, "{}", a)
}
@@ -166,4 +167,3 @@ mod tests {
test = \"wut\"\n")
}
}
-