diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2017-06-29 01:03:35 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2017-07-22 20:38:16 +0200 |
| commit | 0a08ad0443631ca86e61526916fb4ee61fe1abce (patch) | |
| tree | c8dd36ae38044adabc45b83e84d08333eb118dd7 /src/liballoc/raw_vec.rs | |
| parent | e9af03a22279b62ded4c7ea897d5ac3a9b54728c (diff) | |
| download | rust-0a08ad0443631ca86e61526916fb4ee61fe1abce.tar.gz rust-0a08ad0443631ca86e61526916fb4ee61fe1abce.zip | |
Rename {NonZero,Shared,Unique}::new to new_unchecked
Diffstat (limited to 'src/liballoc/raw_vec.rs')
| -rw-r--r-- | src/liballoc/raw_vec.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs index d1aab4c70be..ca55831220d 100644 --- a/src/liballoc/raw_vec.rs +++ b/src/liballoc/raw_vec.rs @@ -104,7 +104,7 @@ impl<T, A: Alloc> RawVec<T, A> { }; RawVec { - ptr: Unique::new(ptr as *mut _), + ptr: Unique::new_unchecked(ptr as *mut _), cap: cap, a: a, } @@ -159,7 +159,7 @@ impl<T, A: Alloc> RawVec<T, A> { /// If the ptr and capacity come from a RawVec created via `a`, then this is guaranteed. pub unsafe fn from_raw_parts_in(ptr: *mut T, cap: usize, a: A) -> Self { RawVec { - ptr: Unique::new(ptr), + ptr: Unique::new_unchecked(ptr), cap: cap, a: a, } @@ -176,7 +176,7 @@ impl<T> RawVec<T, Heap> { /// If the ptr and capacity come from a RawVec, then this is guaranteed. pub unsafe fn from_raw_parts(ptr: *mut T, cap: usize) -> Self { RawVec { - ptr: Unique::new(ptr), + ptr: Unique::new_unchecked(ptr), cap: cap, a: Heap, } |
