about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/rand/mod.rs7
-rw-r--r--src/libstd/rt/sched.rs1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs
index aa4b496338d..9b757092266 100644
--- a/src/libstd/rand/mod.rs
+++ b/src/libstd/rand/mod.rs
@@ -648,8 +648,6 @@ impl SeedableRng<[u32, .. 4]> for XorShiftRng {
 impl XorShiftRng {
     /// Create an xor shift random number generator with a random seed.
     pub fn new() -> XorShiftRng {
-        // generate seeds the same way as seed(), except we have a
-        // specific size, so we can just use a fixed buffer.
         let mut s = [0u8, ..16];
         loop {
             let mut r = OSRng::new();
@@ -714,6 +712,11 @@ impl<R: Rng> Rng for @mut R {
     fn next_u64(&mut self) -> u64 {
         (**self).next_u64()
     }
+
+    #[inline]
+    fn fill_bytes(&mut self, bytes: &mut [u8]) {
+        (**self).fill_bytes(bytes);
+    }
 }
 
 /// Generate a random value using the task-local random number
diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs
index e5cbadda23d..ee43ced44ab 100644
--- a/src/libstd/rt/sched.rs
+++ b/src/libstd/rt/sched.rs
@@ -863,7 +863,6 @@ fn new_sched_rng() -> XorShiftRng {
     use iter::Iterator;
     use rand::SeedableRng;
 
-    // XXX: this could use io::native::file, when it works.
     let fd = do "/dev/urandom".with_c_str |name| {
         unsafe { libc::open(name, libc::O_RDONLY, 0) }
     };