]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/io.rs
Merge remote-tracking branch 'remotes/origin/master' into str-remove-null
[rust.git] / src / libstd / io.rs
index f0d4c3a737596f93857da3b6837f39011a9d3666..1c2fc5db443f41a02a8d54c42def6491528f8cb8 100644 (file)
@@ -1282,7 +1282,7 @@ fn wb() -> c_int {
     fn wb() -> c_int { O_WRONLY as c_int }
 
     let mut fflags: c_int = wb();
-    foreach f in flags.iter() {
+    for f in flags.iter() {
         match *f {
           Append => fflags |= O_APPEND as c_int,
           Create => fflags |= O_CREAT as c_int,
@@ -1946,7 +1946,7 @@ fn check_read_ln(len : uint, s: &str, ivals: &[int]) {
                 if len <= ivals.len() {
                     assert_eq!(res.len(), len);
                 }
-                foreach (iv, c) in ivals.iter().zip(res.iter()) {
+                for (iv, c) in ivals.iter().zip(res.iter()) {
                     assert!(*iv == *c as int)
                 }
             }
@@ -2060,7 +2060,7 @@ fn test_read_write_le() {
         // write the ints to the file
         {
             let file = io::file_writer(&path, [io::Create]).unwrap();
-            foreach i in uints.iter() {
+            for i in uints.iter() {
                 file.write_le_u64(*i);
             }
         }
@@ -2068,7 +2068,7 @@ fn test_read_write_le() {
         // then read them back and check that they are the same
         {
             let file = io::file_reader(&path).unwrap();
-            foreach i in uints.iter() {
+            for i in uints.iter() {
                 assert_eq!(file.read_le_u64(), *i);
             }
         }
@@ -2082,7 +2082,7 @@ fn test_read_write_be() {
         // write the ints to the file
         {
             let file = io::file_writer(&path, [io::Create]).unwrap();
-            foreach i in uints.iter() {
+            for i in uints.iter() {
                 file.write_be_u64(*i);
             }
         }
@@ -2090,7 +2090,7 @@ fn test_read_write_be() {
         // then read them back and check that they are the same
         {
             let file = io::file_reader(&path).unwrap();
-            foreach i in uints.iter() {
+            for i in uints.iter() {
                 assert_eq!(file.read_be_u64(), *i);
             }
         }
@@ -2104,7 +2104,7 @@ fn test_read_be_int_n() {
         // write the ints to the file
         {
             let file = io::file_writer(&path, [io::Create]).unwrap();
-            foreach i in ints.iter() {
+            for i in ints.iter() {
                 file.write_be_i32(*i);
             }
         }
@@ -2112,7 +2112,7 @@ fn test_read_be_int_n() {
         // then read them back and check that they are the same
         {
             let file = io::file_reader(&path).unwrap();
-            foreach i in ints.iter() {
+            for i in ints.iter() {
                 // this tests that the sign extension is working
                 // (comparing the values as i32 would not test this)
                 assert_eq!(file.read_be_int_n(4), *i as i64);