about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2013-12-15 23:35:12 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2013-12-15 23:37:41 +1100
commit164f7a290ef98377e4c8c158eca2fbed098a2842 (patch)
treed9b2239b59f5d18bb680429595192fc64fdad6eb /src/libextra
parentf53292f7ee7365fe50ac216efac438ff5569fd06 (diff)
downloadrust-164f7a290ef98377e4c8c158eca2fbed098a2842.tar.gz
rust-164f7a290ef98377e4c8c158eca2fbed098a2842.zip
std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/arena.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libextra/arena.rs b/src/libextra/arena.rs
index 8aa89f86642..dc5f3b5d3cf 100644
--- a/src/libextra/arena.rs
+++ b/src/libextra/arena.rs
@@ -44,7 +44,6 @@ use std::num;
 use std::ptr;
 use std::mem;
 use std::uint;
-use std::vec;
 use std::unstable::intrinsics;
 use std::unstable::intrinsics::{TyDesc, get_tydesc};
 
@@ -115,7 +114,7 @@ fn round_up_to(base: uint, align: uint) -> uint {
 // in it.
 unsafe fn destroy_chunk(chunk: &Chunk) {
     let mut idx = 0;
-    let buf = vec::raw::to_ptr(chunk.data);
+    let buf = chunk.data.as_ptr();
     let fill = chunk.fill;
 
     while idx < fill {
@@ -179,7 +178,7 @@ impl Arena {
             //debug!("idx = {}, size = {}, align = {}, fill = {}",
             //       start, n_bytes, align, head.fill);
 
-            ptr::offset(vec::raw::to_ptr(this.pod_head.data), start as int)
+            ptr::offset(this.pod_head.data.as_ptr(), start as int)
         }
     }
 
@@ -235,7 +234,7 @@ impl Arena {
             //debug!("idx = {}, size = {}, align = {}, fill = {}",
             //       start, n_bytes, align, head.fill);
 
-            let buf = vec::raw::to_ptr(self.head.data);
+            let buf = self.head.data.as_ptr();
             return (ptr::offset(buf, tydesc_start as int), ptr::offset(buf, start as int));
         }
     }