about summary refs log tree commit diff
path: root/src/libstd/rt/uv
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-08-03 12:45:23 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-08-03 22:48:02 -0400
commit10089455287dcc3652b984ab4bfd6971e1b5f302 (patch)
treea9570eacf4ff89a1f14b7380c080af77918589f6 /src/libstd/rt/uv
parent9f74217d80290d1cb36afcaf68a566b4b4907d27 (diff)
downloadrust-10089455287dcc3652b984ab4bfd6971e1b5f302.tar.gz
rust-10089455287dcc3652b984ab4bfd6971e1b5f302.zip
remove obsolete `foreach` keyword
this has been replaced by `for`
Diffstat (limited to 'src/libstd/rt/uv')
-rw-r--r--src/libstd/rt/uv/net.rs8
-rw-r--r--src/libstd/rt/uv/uvio.rs10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/rt/uv/net.rs b/src/libstd/rt/uv/net.rs
index 773adb3848a..5ac9f52f335 100644
--- a/src/libstd/rt/uv/net.rs
+++ b/src/libstd/rt/uv/net.rs
@@ -701,7 +701,7 @@ mod test {
                     if status.is_none() {
                         rtdebug!("got %d bytes", nread);
                         let buf = buf.unwrap();
-                        foreach byte in buf.slice(0, nread as uint).iter() {
+                        for byte in buf.slice(0, nread as uint).iter() {
                             assert!(*byte == count as u8);
                             rtdebug!("%u", *byte as uint);
                             count += 1;
@@ -777,7 +777,7 @@ mod test {
                         rtdebug!("got %d bytes", nread);
                         let buf = buf.unwrap();
                         let r = buf.slice(0, nread as uint);
-                        foreach byte in r.iter() {
+                        for byte in r.iter() {
                             assert!(*byte == count as u8);
                             rtdebug!("%u", *byte as uint);
                             count += 1;
@@ -848,7 +848,7 @@ mod test {
                 rtdebug!("got %d bytes", nread);
 
                 let buf = buf.unwrap();
-                foreach &byte in buf.slice(0, nread as uint).iter() {
+                for &byte in buf.slice(0, nread as uint).iter() {
                     assert!(byte == count as u8);
                     rtdebug!("%u", byte as uint);
                     count += 1;
@@ -908,7 +908,7 @@ mod test {
                 rtdebug!("got %d bytes", nread);
 
                 let buf = buf.unwrap();
-                foreach &byte in buf.slice(0, nread as uint).iter() {
+                for &byte in buf.slice(0, nread as uint).iter() {
                     assert!(byte == count as u8);
                     rtdebug!("%u", byte as uint);
                     count += 1;
diff --git a/src/libstd/rt/uv/uvio.rs b/src/libstd/rt/uv/uvio.rs
index e15e3adb8c9..5c17aea9341 100644
--- a/src/libstd/rt/uv/uvio.rs
+++ b/src/libstd/rt/uv/uvio.rs
@@ -843,7 +843,7 @@ fn test_simple_tcp_server_and_client() {
                 let mut buf = [0, .. 2048];
                 let nread = stream.read(buf).unwrap();
                 assert_eq!(nread, 8);
-                foreach i in range(0u, nread) {
+                for i in range(0u, nread) {
                     rtdebug!("%u", buf[i] as uint);
                     assert_eq!(buf[i], i as u8);
                 }
@@ -873,7 +873,7 @@ fn test_simple_udp_server_and_client() {
                 let mut buf = [0, .. 2048];
                 let (nread,src) = server_socket.recvfrom(buf).unwrap();
                 assert_eq!(nread, 8);
-                foreach i in range(0u, nread) {
+                for i in range(0u, nread) {
                     rtdebug!("%u", buf[i] as uint);
                     assert_eq!(buf[i], i as u8);
                 }
@@ -908,7 +908,7 @@ fn test_read_and_block() {
 
             while current < expected {
                 let nread = stream.read(buf).unwrap();
-                foreach i in range(0u, nread) {
+                for i in range(0u, nread) {
                     let val = buf[i] as uint;
                     assert_eq!(val, current % 8);
                     current += 1;
@@ -973,7 +973,7 @@ fn test_read_read_read() {
                     let nread = stream.read(buf).unwrap();
                     rtdebug!("read %u bytes", nread as uint);
                     total_bytes_read += nread;
-                    foreach i in range(0u, nread) {
+                    for i in range(0u, nread) {
                         assert_eq!(buf[i], 1);
                     }
                 }
@@ -1065,7 +1065,7 @@ fn test_udp_many_read() {
                     let (nread, src) = res.unwrap();
                     assert_eq!(src, server_out_addr);
                     total_bytes_recv += nread;
-                    foreach i in range(0u, nread) {
+                    for i in range(0u, nread) {
                         assert_eq!(buf[i], 1);
                     }
                 }