libcore: unify gen_<type> methods on rand::RngUtil into the generic gen.

This moves all the basic random value generation into the Rand instances for
each type and then removes the `gen_int`, `gen_char` (etc) methods on RngUtil,
leaving only the generic `gen` and the more specialised methods.

Also, removes some imports that are redundant due to a `use core::prelude::*`
statement.
This commit is contained in:
Huon Wilson
2013-04-24 22:29:19 +10:00
parent 7b009210c6
commit 4a24f10ac6
15 changed files with 106 additions and 247 deletions

View File

@@ -19,20 +19,9 @@ use getopts;
use sort;
use term;
use core::cmp::Eq;
use core::to_str::ToStr;
use core::either::Either;
use core::either;
use core::io::WriterUtil;
use core::io;
use core::comm::{stream, SharedChan};
use core::option;
use core::prelude::*;
use core::result;
use core::str;
use core::task;
use core::vec;
pub mod rustrt {
use core::libc::size_t;
@@ -608,12 +597,8 @@ pub mod bench {
use time::precise_time_ns;
use test::{BenchHarness, BenchSamples};
use stats::Stats;
use core::num;
use core::prelude::*;
use core::rand::RngUtil;
use core::rand;
use core::u64;
use core::vec;
pub impl BenchHarness {