diff options
author | Andrzej Janik <vosen@vosen.pl> | 2015-06-06 18:11:48 +0200 |
---|---|---|
committer | Andrzej Janik <vosen@vosen.pl> | 2015-06-06 18:11:48 +0200 |
commit | 8487b63c97080296269242c31f36a557a90da0cf (patch) | |
tree | 75aef512eeba4074565e6c3eadca129189dec74d /tests | |
parent | 2fcd829b1d9c70d0981411b4f4adca9124985b54 (diff) | |
download | milf-rs-8487b63c97080296269242c31f36a557a90da0cf.tar.gz milf-rs-8487b63c97080296269242c31f36a557a90da0cf.zip |
Rework fix for table redefinition to avoid breaking AST-compatiblity
Diffstat (limited to 'tests')
-rw-r--r-- | tests/valid.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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)); } |