about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-12-18 02:13:20 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2013-12-19 10:18:02 +1100
commit9177f7ecb4d897a72aeaa0b3dfed930286946cf3 (patch)
tree8a2eb18e41f2d4262e2ed32f30e614aee567e72e /src/libstd/rt
parent4c79b22ef26a2b846d84c46bc8fea50c953559dd (diff)
downloadrust-9177f7ecb4d897a72aeaa0b3dfed930286946cf3.tar.gz
rust-9177f7ecb4d897a72aeaa0b3dfed930286946cf3.zip
std::vec: remove .as_muf_buf, replaced by .as_mut_ptr & .len.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/sched.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs
index ac3aeb5a4bb..cd21cdeb711 100644
--- a/src/libstd/rt/sched.rs
+++ b/src/libstd/rt/sched.rs
@@ -914,13 +914,11 @@ fn new_sched_rng() -> XorShiftRng {
     let mut seeds = [0u32, .. 4];
     let size = mem::size_of_val(&seeds);
     loop {
-        let nbytes = seeds.as_mut_buf(|buf, _| {
-            unsafe {
-                libc::read(fd,
-                           buf as *mut libc::c_void,
-                           size as libc::size_t)
-            }
-        });
+        let nbytes = unsafe {
+            libc::read(fd,
+                       seeds.as_mut_ptr() as *mut libc::c_void,
+                       size as libc::size_t)
+        };
         rtassert!(nbytes as uint == size);
 
         if !seeds.iter().all(|x| *x == 0) {