diff options
Diffstat (limited to 'src/libstd/c_vec.rs')
| -rw-r--r-- | src/libstd/c_vec.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/c_vec.rs b/src/libstd/c_vec.rs index 1267d7411cc..1f94d7b4fa6 100644 --- a/src/libstd/c_vec.rs +++ b/src/libstd/c_vec.rs @@ -138,11 +138,15 @@ impl<T> CVec<T> { /// Note that if you want to access the underlying pointer without /// cancelling the destructor, you can simply call `transmute` on the return /// value of `get(0)`. - pub unsafe fn unwrap(mut self) -> *mut T { + pub unsafe fn into_inner(mut self) -> *mut T { self.dtor = None; self.base } + /// Deprecated, use into_inner() instead + #[deprecated = "renamed to into_inner()"] + pub unsafe fn unwrap(self) -> *mut T { self.into_inner() } + /// Returns the number of items in this vector. pub fn len(&self) -> uint { self.len } |
