Skip to content

Commit 5c18bf6

Browse files
committed
core: Rename at_vec::unsafe to raw
1 parent ae86db0 commit 5c18bf6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libcore/at_vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern mod rusti {
2828
#[inline(always)]
2929
pure fn capacity<T>(&&v: @[const T]) -> uint {
3030
unsafe {
31-
let repr: **unsafe::VecRepr =
31+
let repr: **raw::VecRepr =
3232
::unsafe::reinterpret_cast(&addr_of(v));
3333
(**repr).unboxed.alloc / sys::size_of::<T>()
3434
}
@@ -49,8 +49,8 @@ pure fn capacity<T>(&&v: @[const T]) -> uint {
4949
#[inline(always)]
5050
pure fn build_sized<A>(size: uint, builder: fn(push: pure fn(+A))) -> @[A] {
5151
let mut vec = @[];
52-
unsafe { unsafe::reserve(vec, size); }
53-
builder(|+x| unsafe { unsafe::push(vec, move x) });
52+
unsafe { raw::reserve(vec, size); }
53+
builder(|+x| unsafe { raw::push(vec, move x) });
5454
return vec;
5555
}
5656

@@ -141,7 +141,7 @@ impl<T: Copy> @[T]: Add<&[const T],@[T]> {
141141
}
142142

143143

144-
mod unsafe {
144+
mod raw {
145145
type VecRepr = vec::raw::VecRepr;
146146
type SliceRepr = vec::raw::SliceRepr;
147147

src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct Arena {
6666

6767
fn chunk(size: uint, is_pod: bool) -> Chunk {
6868
let mut v = @[];
69-
unsafe { at_vec::unsafe::reserve(v, size); }
69+
unsafe { at_vec::raw::reserve(v, size); }
7070
{ data: v, mut fill: 0u, is_pod: is_pod }
7171
}
7272

0 commit comments

Comments
 (0)