Merge pull request #17 from jroesch/into-iter

Update uses of move_iter() to into_iter()
This commit is contained in:
Alex Crichton 2014-09-18 09:50:04 -04:00
commit 1ca52c5ea4

View file

@ -33,10 +33,10 @@ fn to_json(toml: Value) -> json::Json {
Some(&Table(..)) => true, Some(&Table(..)) => true,
_ => false, _ => false,
}; };
let json = json::List(arr.move_iter().map(to_json).collect()); let json = json::List(arr.into_iter().map(to_json).collect());
if is_table {json} else {doit("array", json)} if is_table {json} else {doit("array", json)}
} }
Table(table) => json::Object(table.move_iter().map(|(k, v)| { Table(table) => json::Object(table.into_iter().map(|(k, v)| {
(k, to_json(v)) (k, to_json(v))
}).collect()), }).collect()),
} }