libcore: Remove mutable fields from rand.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
use core::rand::RngUtil;
|
||||
|
||||
pub fn mkdtemp(tmpdir: &Path, suffix: &str) -> Option<Path> {
|
||||
let r = rand::rng();
|
||||
let mut r = rand::rng();
|
||||
for 1000.times {
|
||||
let p = tmpdir.push(r.gen_str(16) + suffix);
|
||||
if os::make_dir(&p, 0x1c0) { // 700
|
||||
|
||||
@@ -688,7 +688,7 @@ pub mod bench {
|
||||
// not met, it may run as long as the Go algorithm.
|
||||
pub fn auto_bench(&mut self, f: &fn(&mut BenchHarness)) -> ~[f64] {
|
||||
|
||||
let rng = rand::rng();
|
||||
let mut rng = rand::rng();
|
||||
let mut magnitude = 10;
|
||||
let mut prev_madp = 0.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user