From 9177f7ecb4d897a72aeaa0b3dfed930286946cf3 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Wed, 18 Dec 2013 02:13:20 +1100 Subject: std::vec: remove .as_muf_buf, replaced by .as_mut_ptr & .len. --- src/libstd/rt/sched.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/libstd/rt') 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) { -- cgit 1.4.1-3-g733a5