diff options
author | Josh Matthews <josh@joshmatthews.net> | 2015-01-15 13:26:44 -0500 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2015-01-28 10:16:49 +1000 |
commit | 95fc29fa0db21959df99d81cdbb9561226321d2f (patch) | |
tree | a48e171165ec155062ef13c550b2c0f72d127425 /components/util/sort.rs | |
parent | ff8cbff81016c157373c1675f3eee69dd70ae544 (diff) | |
download | servo-95fc29fa0db21959df99d81cdbb9561226321d2f.tar.gz servo-95fc29fa0db21959df99d81cdbb9561226321d2f.zip |
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
Diffstat (limited to 'components/util/sort.rs')
-rw-r--r-- | components/util/sort.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/util/sort.rs b/components/util/sort.rs index d31948cb0e8..ce7ab4d86c9 100644 --- a/components/util/sort.rs +++ b/components/util/sort.rs @@ -81,6 +81,7 @@ pub fn quicksort_by<T>(arr: &mut [T], compare: fn(&T, &T) -> Ordering) { #[cfg(test)] pub mod test { + use std::cmp::Ordering; use std::rand; use std::rand::Rng; @@ -88,7 +89,7 @@ pub mod test { #[test] pub fn random() { - let mut rng = rand::task_rng(); + let mut rng = rand::thread_rng(); for _ in range(0u32, 50000u32) { let len: uint = rng.gen(); let mut v: Vec<int> = rng.gen_iter::<int>().take((len % 32) + 1).collect(); |