diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2014-12-28 02:20:47 +0200 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2014-12-28 13:46:35 +0200 |
| commit | 1e89bbcb67020892bc0af5af218c35f0fd453fa4 (patch) | |
| tree | 7f76435dc4fb50ab581a1f3043f12e3d7f5abca7 /src/libregex | |
| parent | 0201334439393bed205c1148bed425b80aab8c22 (diff) | |
| download | rust-1e89bbcb67020892bc0af5af218c35f0fd453fa4.tar.gz rust-1e89bbcb67020892bc0af5af218c35f0fd453fa4.zip | |
Rename TaskRng to 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! * Rename TaskRng to ThreadRng * Rename task_rng to thread_rng [breaking-change]
Diffstat (limited to 'src/libregex')
| -rw-r--r-- | src/libregex/test/bench.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libregex/test/bench.rs b/src/libregex/test/bench.rs index 0c204f759e6..38f030c3bda 100644 --- a/src/libregex/test/bench.rs +++ b/src/libregex/test/bench.rs @@ -9,7 +9,7 @@ // except according to those terms. #![allow(non_snake_case)] -use std::rand::{Rng, task_rng}; +use std::rand::{Rng, thread_rng}; use stdtest::Bencher; use regex::{Regex, NoExpand}; @@ -154,7 +154,7 @@ fn medium() -> Regex { regex!("[XYZ]ABCDEFGHIJKLMNOPQRSTUVWXYZ$") } fn hard() -> Regex { regex!("[ -~]*ABCDEFGHIJKLMNOPQRSTUVWXYZ$") } fn gen_text(n: uint) -> String { - let mut rng = task_rng(); + let mut rng = thread_rng(); let mut bytes = rng.gen_ascii_chars().map(|n| n as u8).take(n) .collect::<Vec<u8>>(); for (i, b) in bytes.iter_mut().enumerate() { |
