about summary refs log tree commit diff
path: root/src/libstd/rand
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-31 12:20:46 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-02-02 13:40:18 -0500
commitd5d7e6565a4034b93d19be1edafd20730a4276bc (patch)
treef978751c20a214c9fe0cd2d60645a4e1a3b760fd /src/libstd/rand
parent9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff)
downloadrust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz
rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/libstd/rand')
-rw-r--r--src/libstd/rand/mod.rs2
-rw-r--r--src/libstd/rand/os.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index 211abc2fc83..cc72c5bed99 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -464,7 +464,7 @@ mod test {
         // check every remainder mod 8, both in small and big vectors.
         let lengths = [0, 1, 2, 3, 4, 5, 6, 7,
                        80, 81, 82, 83, 84, 85, 86, 87];
-        for &n in lengths.iter() {
+        for &n in &lengths {
             let mut v = repeat(0u8).take(n).collect::<Vec<_>>();
             r.fill_bytes(v.as_mut_slice());
 
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index 992afb2d10f..4b45d5501c2 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -404,7 +404,7 @@ mod test {
         }
 
         // start all the tasks
-        for tx in txs.iter() {
+        for tx in &txs {
             tx.send(()).unwrap();
         }
     }