about summary refs log tree commit diff
path: root/src/libcore/rand.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-05-26 00:32:08 -0700
committerBrian Anderson <banderson@mozilla.com>2012-05-26 02:28:00 -0700
commit432c6cbde93ca525cc33fd17873a0557dffa07c5 (patch)
treef3b887343ed4473be3cfc7782bd3715175e316c3 /src/libcore/rand.rs
parent5281db2bc273f089a872175f935c01f33dfa4326 (diff)
core: Make range follow the for loop protocol
Diffstat (limited to 'src/libcore/rand.rs')
-rw-r--r--src/libcore/rand.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/rand.rs b/src/libcore/rand.rs
index dedcf991670..592124767ff 100644
--- a/src/libcore/rand.rs
+++ b/src/libcore/rand.rs
@@ -202,7 +202,7 @@ impl extensions for rng {
     fn weighted_vec<T:copy>(v: [weighted<T>]) -> [T] {
         let mut r = [];
         for v.each {|item|
-            uint::range(0u, item.weight) {|_i|
+            for uint::range(0u, item.weight) {|_i|
                 r += [item.item];
             }
         }