1
Fork 0

Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"

This reverts commit 1be24f0758.

Not quite ready.
This commit is contained in:
Niko Matsakis 2012-09-18 21:41:13 -07:00
parent 1be24f0758
commit 8d4928f780
77 changed files with 601 additions and 565 deletions

View file

@ -179,7 +179,7 @@ fn to_writer_pretty(wr: io::Writer, j: Json, indent: uint) {
fn escape_str(s: &str) -> ~str {
let mut escaped = ~"\"";
for str::chars_each(s) |c| {
do str::chars_iter(s) |c| {
match c {
'"' => escaped += ~"\\\"",
'\\' => escaped += ~"\\\\",
@ -834,8 +834,8 @@ mod tests {
fn mk_dict(items: &[(~str, Json)]) -> Json {
let d = map::str_hash();
for vec::each_ref(items) |item| {
let (key, value) = copy *item;
do vec::iter(items) |item| {
let (key, value) = copy item;
d.insert(key, value);
};