diff options
| author | Huon Wilson <dbau.pp+github@gmail.com> | 2013-04-24 00:00:43 +1000 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2013-04-24 22:34:10 +1000 |
| commit | 6c0a7c7b7d304157f31189bf34f50ef4027e1d66 (patch) | |
| tree | 231628b0d02fbc5dc74cf71ca0a04ce422820243 /src/libstd/timer.rs | |
| parent | 706096b31960143fb1eb957a882f170ae4a8b4e9 (diff) | |
| download | rust-6c0a7c7b7d304157f31189bf34f50ef4027e1d66.tar.gz rust-6c0a7c7b7d304157f31189bf34f50ef4027e1d66.zip | |
libcore: remove @Rng from rand, and use traits instead.
Also, rename RandRes -> IsaacRng, and make the constructors static methods.
Diffstat (limited to 'src/libstd/timer.rs')
| -rw-r--r-- | src/libstd/timer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/timer.rs b/src/libstd/timer.rs index e862fe6077c..f0daf407073 100644 --- a/src/libstd/timer.rs +++ b/src/libstd/timer.rs @@ -220,7 +220,7 @@ mod test { let hl_loop_clone = hl_loop.clone(); do task::spawn { use core::rand::*; - let rng = Rng(); + let rng = rng(); for iter::repeat(times) { sleep(&hl_loop_clone, rng.next() as uint % maxms); } @@ -277,7 +277,7 @@ mod test { let hl_loop = uv::global_loop::get(); for iter::repeat(times as uint) { - let expected = rand::Rng().gen_str(16u); + let expected = rand::rng().gen_str(16u); let (test_po, test_ch) = stream::<~str>(); let hl_loop_clone = hl_loop.clone(); do task::spawn() { |
