From 9cf271fe96b474d514b1052935db70c4056cf076 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 18 Sep 2012 21:41:37 -0700 Subject: De-mode vec::each() and many of the str iteration routines Note that the method foo.each() is not de-moded, nor the other vec routines. --- src/libstd/json.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/json.rs') diff --git a/src/libstd/json.rs b/src/libstd/json.rs index b269ca84104..5b7c92f59fa 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -179,7 +179,7 @@ fn to_writer_pretty(wr: io::Writer, j: Json, indent: uint) { fn escape_str(s: &str) -> ~str { let mut escaped = ~"\""; - do str::chars_iter(s) |c| { + for str::chars_each(s) |c| { match c { '"' => escaped += ~"\\\"", '\\' => escaped += ~"\\\\", @@ -834,8 +834,8 @@ mod tests { fn mk_dict(items: &[(~str, Json)]) -> Json { let d = map::str_hash(); - do vec::iter(items) |item| { - let (key, value) = copy item; + for vec::each(items) |item| { + let (key, value) = copy *item; d.insert(key, value); }; -- cgit 1.4.1-3-g733a5