Convert vec::{as_imm_buf, as_mut_buf} to methods.

This commit is contained in:
Huon Wilson 2013-07-03 16:34:17 +10:00
parent a732a2daff
commit cdea73cf5b
14 changed files with 90 additions and 86 deletions

View file

@ -11,7 +11,6 @@
// error-pattern:index out of bounds
use std::sys;
use std::vec;
fn main() {
@ -22,7 +21,7 @@ fn main() {
// huge).
let x = ~[1u,2u,3u];
do vec::as_imm_buf(x) |p, _len| {
do x.as_imm_buf |p, _len| {
let base = p as uint;
let idx = base / sys::size_of::<uint>();
error!("ov1 base = 0x%x", base);