summary refs log tree commit diff
path: root/src/libstd/time.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-09-18 21:41:37 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-09-19 10:52:59 -0700
commit9cf271fe96b474d514b1052935db70c4056cf076 (patch)
tree7a6fb31efeaa4de91317c16aca824153aaaf988c /src/libstd/time.rs
parent62b7f4d800325b46002c47d23b58a9f2b7fabb9b (diff)
downloadrust-9cf271fe96b474d514b1052935db70c4056cf076.tar.gz
rust-9cf271fe96b474d514b1052935db70c4056cf076.zip
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.
Diffstat (limited to 'src/libstd/time.rs')
-rw-r--r--src/libstd/time.rs24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 84d4e49ef90..45ea25c3858 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -1023,7 +1023,7 @@ mod tests {
             }
         }
 
-        [
+        for vec::each([
             ~"Sunday",
             ~"Monday",
             ~"Tuesday",
@@ -1031,9 +1031,11 @@ mod tests {
             ~"Thursday",
             ~"Friday",
             ~"Saturday"
-        ]/_.iter(|day| assert test(day, ~"%A"));
+        ]) |day| {
+            assert test(*day, ~"%A");
+        }
 
-        [
+        for vec::each([
             ~"Sun",
             ~"Mon",
             ~"Tue",
@@ -1041,9 +1043,11 @@ mod tests {
             ~"Thu",
             ~"Fri",
             ~"Sat"
-        ]/_.iter(|day| assert test(day, ~"%a"));
+        ]) |day| {
+            assert test(*day, ~"%a");
+        }
 
-        [
+        for vec::each([
             ~"January",
             ~"February",
             ~"March",
@@ -1056,9 +1060,11 @@ mod tests {
             ~"October",
             ~"November",
             ~"December"
-        ]/_.iter(|day| assert test(day, ~"%B"));
+        ]) |day| {
+            assert test(*day, ~"%B");
+        }
 
-        [
+        for vec::each([
             ~"Jan",
             ~"Feb",
             ~"Mar",
@@ -1071,7 +1077,9 @@ mod tests {
             ~"Oct",
             ~"Nov",
             ~"Dec"
-        ]/_.iter(|day| assert test(day, ~"%b"));
+        ]) |day| {
+            assert test(*day, ~"%b");
+        }
 
         assert test(~"19", ~"%C");
         assert test(~"Fri Feb 13 23:31:30 2009", ~"%c");