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 @@ impl<T, A: AllocRef> RawVec<T, A> {
/// 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()
}