mark raw_vec::ptr with inline

This commit is contained in:
Andreas Jonson 2020-11-16 22:47:35 +01:00
parent 5fab31e5dd
commit 88d1f31a90

View File

@ -220,6 +220,7 @@ pub unsafe fn from_raw_parts_in(ptr: *mut T, capacity: usize, alloc: A) -> Self
/// Gets a raw pointer to the start of the allocation. Note that this is
/// `Unique::dangling()` if `capacity == 0` or `T` is zero-sized. In the former case, you must
/// be careful.
#[inline]
pub fn ptr(&self) -> *mut T {
self.ptr.as_ptr()
}