From 8487b63c97080296269242c31f36a557a90da0cf Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Sat, 6 Jun 2015 18:11:48 +0200 Subject: Rework fix for table redefinition to avoid breaking AST-compatiblity --- tests/valid.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/valid.rs') diff --git a/tests/valid.rs b/tests/valid.rs index 18c21d6..568518b 100644 --- a/tests/valid.rs +++ b/tests/valid.rs @@ -32,7 +32,7 @@ fn to_json(toml: Value) -> Json { let json = Json::Array(arr.into_iter().map(to_json).collect()); if is_table {json} else {doit("array", json)} } - Table(table) => Json::Object(table.0.into_iter().map(|(k, v)| { + Table(table) => Json::Object(table.into_iter().map(|(k, v)| { (k, to_json(v)) }).collect()), } @@ -58,7 +58,7 @@ fn run(toml: &str, json: &str) { let table2 = Parser::new(&toml_string).parse().unwrap(); // floats are a little lossy - if table2.0.values().any(|v| v.as_float().is_some()) { return } + if table2.values().any(|v| v.as_float().is_some()) { return } assert_eq!(toml, Table(table2)); } -- cgit v1.2.3