1
Fork 0

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.
This commit is contained in:
Niko Matsakis 2012-09-18 21:41:37 -07:00
parent 62b7f4d800
commit 9cf271fe96
81 changed files with 556 additions and 750 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 = ~"\"";
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);
};