about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-29 16:36:29 -0800
commit9cbbfee8a4738663625e373f165b8ec5f6317ef4 (patch)
tree7738cc422f972c8ce62ed56b7d77f4b284d01c5a /src/libcollections
parent3385ff7757e8eb328c9fc10f3b1ee057bcb2fc2f (diff)
parent1e89bbcb67020892bc0af5af218c35f0fd453fa4 (diff)
downloadrust-9cbbfee8a4738663625e373f165b8ec5f6317ef4.tar.gz
rust-9cbbfee8a4738663625e373f165b8ec5f6317ef4.zip
rollup merge of #20264: nagisa/threadrng
Since runtime is removed, rust has no tasks anymore and everything is moving
from being task-* to thread-*. Let’s rename TaskRng as well!

This is a breaking change. If a breaking change for consistency is not desired, feel free to close.
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/slice.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs
index dbf058ced52..7adb5b13da2 100644
--- a/src/libcollections/slice.rs
+++ b/src/libcollections/slice.rs
@@ -1347,7 +1347,7 @@ mod tests {
     use core::cell::Cell;
     use core::default::Default;
     use core::mem;
-    use std::rand::{Rng, task_rng};
+    use std::rand::{Rng, thread_rng};
     use std::rc::Rc;
     use super::ElementSwaps;
 
@@ -1963,7 +1963,7 @@ mod tests {
     fn test_sort() {
         for len in range(4u, 25) {
             for _ in range(0i, 100) {
-                let mut v = task_rng().gen_iter::<uint>().take(len)
+                let mut v = thread_rng().gen_iter::<uint>().take(len)
                                       .collect::<Vec<uint>>();
                 let mut v1 = v.clone();
 
@@ -1999,7 +1999,7 @@ mod tests {
                 // number this element is, i.e. the second elements
                 // will occur in sorted order.
                 let mut v = range(0, len).map(|_| {
-                        let n = task_rng().gen::<uint>() % 10;
+                        let n = thread_rng().gen::<uint>() % 10;
                         counts[n] += 1;
                         (n, counts[n])
                     }).collect::<Vec<(uint, int)>>();