Skip to content

Commit

Permalink
liballoc/RawVec: constify non_null, restore ptr impl
Browse files Browse the repository at this point in the history
  • Loading branch information
mammothbane committed Oct 6, 2024
1 parent 00f4d06 commit 6c72394
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/alloc/src/raw_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,12 @@ impl<A: Allocator> RawVecInner<A> {

#[inline]
const fn ptr<T>(&self) -> *mut T {
self.ptr.as_ptr() as _
self.non_null::<T>().as_ptr()
}

#[inline]
fn non_null<T>(&self) -> NonNull<T> {
self.ptr.cast().into()
const fn non_null<T>(&self) -> NonNull<T> {
self.ptr.cast().as_non_null_ptr()
}

#[inline]
Expand Down

0 comments on commit 6c72394

Please sign in to comment.