about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2012-09-26 21:35:42 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-10-01 20:44:30 -0700
commit8fc3088b2aba397c0f561ce978b2d4a47f8a9eab (patch)
tree5df5d2dce591686d740d46fdc54545e2e4fd3bc4 /src/libcore
parent81423a3866fb6cd4cadd28ed49273d7e22d48c17 (diff)
downloadrust-8fc3088b2aba397c0f561ce978b2d4a47f8a9eab.tar.gz
rust-8fc3088b2aba397c0f561ce978b2d4a47f8a9eab.zip
rename vec::raw::form_slice to buf_as_slice
This matches the str::raw function.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/str.rs2
-rw-r--r--src/libcore/uint-template.rs3
-rw-r--r--src/libcore/vec.rs5
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index 227635944dd..e8a88f3bc1b 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -349,7 +349,7 @@ pub pure fn to_bytes(s: &str) -> ~[u8] unsafe {
 #[inline(always)]
 pub pure fn byte_slice<T>(s: &str, f: fn(v: &[u8]) -> T) -> T {
     do as_buf(s) |p,n| {
-        unsafe { vec::raw::form_slice(p, n-1u, f) }
+        unsafe { vec::raw::buf_as_slice(p, n-1u, f) }
     }
 }
 
diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs
index eb58d17c5f1..7d0421c0730 100644
--- a/src/libcore/uint-template.rs
+++ b/src/libcore/uint-template.rs
@@ -226,8 +226,7 @@ pub pure fn to_str_bytes<U>(neg: bool, num: T, radix: uint,
                 *ptr::mut_offset(mp, i) = '-' as u8;
             }
 
-            vec::raw::form_slice(ptr::offset(p, i),
-                                 len - i, f)
+            vec::raw::buf_as_slice(ptr::offset(p, i), len - i, f)
         }
     }
 }
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index 3fdf97cf350..ce82215a87c 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -1741,8 +1741,9 @@ pub mod raw {
      * not bytes).
      */
     #[inline(always)]
-    pub unsafe fn form_slice<T,U>(p: *T, len: uint,
-                                  f: fn(v: &[T]) -> U) -> U {
+    pub unsafe fn buf_as_slice<T,U>(p: *T,
+                                    len: uint,
+                                    f: fn(v: &[T]) -> U) -> U {
         let pair = (p, len * sys::size_of::<T>());
         let v : *(&blk/[T]) =
             ::cast::reinterpret_cast(&addr_of(&pair));